Matt Adams wrote:
> BEGIN {
> package MyApp;
> use MyApp::Constants;
> $ENV{MAYPOLE_CONFIG} = BINPATH . '/MyApp.yaml';
> }
>
> package MyApp;
>
> use Maypole::Application qw(
> -Debug
> Config::YAML
> Authentication::Abstract
> -Setup
> );
> The error (slightly edited to remove long paths) is:
>
> MyApp...Debugging enabled
> MyApp...Loaded plugin: Maypole::Plugin::Config::YAML
> MyApp...Loaded plugin: Maypole::Plugin::Authentication::Abstract
> MyApp...No DSN set in config
> [error] Can't locate object method "new" via package
> "Class::DBI::Loader::" (perhaps you forgot to load
> "Class::DBI::Loader::"?) at Class/DBI/Loader.pm line 77.
> BEGIN failed--compilation aborted at MyApp.pm line 36.
> Compilation failed in require at (eval 17) line 3.
> [error] Can't call method "_table2class" on an undefined value at
> Maypole/Model/CDBI.pm line 250.
> My YAML config file is:
>
> --- #YAML:1.0
> dsn: dbi:mysql:myapp
> model: MyApp::Model::CDBI
> pass: user
> rows_per_page: 10
> uri_base: http://bugs:8000/
> user: user
> datetime: '%a, %b %e, %Y at %l:%M %p'
>
> FWIW, I'm using a PERL5LIB path modified by my Apache configuration.
> And few of my Perl modules are in the standard location but that doesn't
> seem to (and shouldn't) matter since the PERL5LIB path includes them all.
> It appears to be picking up the correct version of Maypole. I
> only have one installed. Things work if I use Maypole::Application 2.07
> but not if I use Maypole::Application 2.08 or 2.09.
Hi Matt,
I just noticed one more oddity. Your 'reference' version of Maypole is
2.07. Now that was never actually released to CPAN because of problems
that emerged with the pre-release. So I guess it's worth asking whether
you see your problem with an earlier released version?
That said, you may need to do some more investigation anyway. I
mentioned that I didn't use YAML and it's clear from Simon's answer that
he doesn't! Nobody else has stepped up to say that they DO use YAML and
report either that they can repeat your problem or that it works for
them. So there's a real lack of information to diagnose the problem.
I'd suggest you step though the problem in the debugger using
Maypole::CLI. The relevant bits of Maypole::Application,
Maypole::Plugin::Config::YAML and Maypole::Model::CDBI are small enough
that this should be fairly easy. That way you can find out just what is
going wrong and in which module.
Cheers, Dave
-- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.4 - Release Date: 01/02/05_______________________________________________ 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:58 GMT