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

From: Peter Speltz (peterspeltz at yahoo.com)
Date: Tue Dec 28 2004 - 03:33:55 GMT


--- Dave Howorth <Dave.Howorth at acm.org> wrote:

> Peter Speltz wrote:
> > Really , really a nice try, Dave :) HOwever, in mysql table names are
> > actually " Any character that is allowed in a directory name, except
> > `/', `\', or `.' " So table name should be able to map to directory
> > name no problem. Maybe other databases are different though.
>
> (a) yes, other databases are different and (b) I agree for the case of
> MySQL but I wouldn't be confident that Maypole is coded carefully enough
> to handle it and I'm very sure you'd find it a pain to navigate in the
> shell to create and manage those directories (as you demonstrated to
> yourself).
>

I'm not sure maypole should be coded enough carefully to handle people using
characters besides letters, numbers, and underscores. I've never had a need
for other characters in table names but maybe sometimes there is a legitamate
need. If there is an effort to make it compliant with any table naming
standards, it should be to the SQL standard.

> It's one way of finding out how good people are with the shell :) My
> favourite was always creating files with newlines in their name. But I
> can't remember how you get rid of them now :(
>

hee hee

> >> I get worked up about Maypole plugging raw table names and monikers
> >> into the HTML output seen by users, but personally I don't care
> >> that much what name is used for the template directory :)
>
> > Me too. I was hoping to override moniker to fix this. I remember a
> > thread on it and maypole being internally dependent on it. I hope
> > that can be fixed.
>
> There's no point in overriding moniker, IMHO. That's just adding a fudge
> to a fudge. It would make the code even more confusing to read. My vote
> would go for throwing out moniker entirely; just use the table name and
> provide a means for the user-developer to override that if she wants
> (similar to colnames or to the Class::DBI name mechanism that you can
> use to stop it mangling your table names in the SQL interface).
>

I'm not sure i agree. IF nothing breaks when you do it, then that seems like
the place to give your objects their human name. This topic was discussed in
earlier thread. Don't recall a conclusion from it though. Did anyone dig into
the internals to see if one could override moniker without breaking anything.
Remember the topic of this thread? If View::Base::paths is changed to use
table names (as it should be :) ), that's one less place that could be mucked
up. Also, your documentation job will be a great deal easier :)

> This whole mess is a large part of why I set out to write my own Maypole
> loader so the only name mangling that goes on is what I do and it's all
> done explicitly in one place.
>

How's this coming? any changes? It looked cool but i haven't tried it yet.

> Cheers, Dave
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.298 / Virus Database: 265.6.5 - Release Date: 26/12/04
>
>
> _______________________________________________
> maypole mailing list
> maypole at lists.netthink.co.uk
> http://lists.netthink.co.uk/listinfo/maypole
>

=====
pjs

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

_______________________________________________
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