I'm trying to use the YAML class and having trouble. I'm using the SVN
version of Maypole (updated today). I do the following:
CrossTrack->load_config( '/var/www/html/CrossTrack/lib/crosstrack.yaml' );
CrossTrack->setup( 'dbi:mysql:crosstrack', 'root', 'xxxxx' );
and I get the following (running with Maypole::CLI):
Couldn't require CrossTrack - Can't call method "model" on unblessed
reference at /usr/lib/perl5/site_perl/5.8.3/Maypole.pm line 33.
Compilation failed in require at
/usr/lib/perl5/site_perl/5.8.3/Maypole/CLI.pm line 15.
BEGIN failed--compilation aborted.
Can't call method "view" on unblessed reference at
/usr/lib/perl5/site_perl/5.8.3/Maypole.pm line 48.
CHECK failed--call queue aborted.
If I take out the load_config everything is good. However, when the
load_config is in perl doesn't die until somewhere in the call to setup
(line 33 to be precise). It's doing something funny to the value in
config. It looks to me like config needs to be blessed somewhere in
load_config.
I've added a bless there to make it work for me. On line 142 there is:
Load( do { <$file> }
I changed it to look like:
bless Load( do { <$file> } ), 'Maypole::Config'
It seems to work. Is this a bug or did I do something wrong?
_______________________________________________
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