Re: [Maypole] Why is moniker used instead of of table name when looking for table specific templates?

From: Tony Bowden (tony-maypole at kasei.com)
Date: Wed Dec 29 2004 - 20:09:35 GMT


On Wed, Dec 29, 2004 at 09:57:06AM -0800, Peter Speltz wrote:
> But for the life of me, WHY UNIVERSAL::moniker ???

Because that's what UNIVERSAL::moniker is for doing.

> By using that you take the
> Universe out of it and effectively make it "UglyMaypoleInternal::moniker".

How so?

> becomes useless for human consumption and something solely for computer
> consumption

How so?

> It contradicts the Universe::moniker doc.

How so?

> It means all the templates have to be changed.

I thought they needed to be changed anyway? And even then there's only a
visible difference in the small number of cases where the moniker and
table name disagree.

> It means you really don't want to override it if you can help it.

There should be no ill effects of doing so. When moniker guesses
incorrectly you probably want to override it anyway.

> A more appropriate method would be Maypole::Model::Base::maypole_moniker. This
> would effect fewer changes on Maypole (docs, templates, internals alike) and be
> more intutive to users trying to figure out their URLS and Directories.

By all means there should be a method in Maypole like this. It's always good
practice to have an insulating layer around 3rd party modules. But what
are you expecting this method to do by default Call $self->moniker? Or
something else?

Tony

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT