Re: [Maypole] tables with underscore in them

From: Simon Flack (sf at flacks.net)
Date: Thu Sep 16 2004 - 18:24:07 BST


On Thu, 16 Sep 2004 19:27:49 +0300 (IDT), Gabor Szabo wrote
> In the latest CPANTS database there is a table with underscores in
> the name. It is displayed correctly but when I try to add the following
> relationship it crashes.
>
> Module::CPANTS::Maypole::Modules_in_dist->has_a(distid =>
> "Module::CPANTS::Maypole::Dist");
>
> This is the error message I get:
>
> Can't locate object method "has_a" via package
> "Module::CPANTS::Maypole::Modules_in_dist" (perhaps you forgot to
> load "Module::CPANTS::Maypole::Modules_in_dist"?) at Module/CPANTS/Maypole.pm
> line 20
>
> The same thing works with other tables. Is there something funky with
> underscores ?

Tables with underscores are converted to CamelCase module names. Try
Module::CPANTS::Maypole::ModulesInDist.

See also:
    http://search.cpan.org/perldoc?Class::DBI::Loader

> Actually I checked and renamed the table to be modulesindist and it
> worked well so there *is* something funky with underscores.
>
> Gabor

--simonflk

_______________________________________________
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:56 GMT