Re: [Maypole] Maypole model inheritance

From: Simon Flack (sf at flacks.net)
Date: Sun Dec 12 2004 - 17:43:55 GMT


Dave Howorth wrote:
> I did a little browsing around CDBI and found what may be a possibility.
> I looked at AutoLoader
> <http://search.cpan.org/~ryanparr/Class-DBI-AutoLoader-0.12/AutoLoader.pm>
> to see what it did and discovered two interesting features:
>
> (1) It has a specific mechanism for loading additional classes:
>
> use Class::DBI::AutoLoader (
> ...
> additional_packages => ['Class::DBI::AbstractSearch']
> );
>
> (2) It has a method of playing base class switcheroo using this package
> specifically designed for the purpose:
>
> <http://search.cpan.org/~rclamp/Class-DBI-BaseDSN-1.22/lib/Class/DBI/BaseDSN.pm>

Yes, I like that. One issue is that the table2class() differs from
Class::DBI::Loader. E.g.

table: hello-world
CDBI::AutoLoader: HelloWorld
CDBI::Loader: Hello-world # this is an invalid package name

table: hello__world
CDBI::AutoLoader: HelloWorld
CDBI::Loader: Hello_World

I'll look into this further.

Simon

_______________________________________________
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