[prev] [thread] [next] [lurker] [Date index for 2004/05/21]
--sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I'm seeing some errors when trying to install Siesta. I've tried both 0.65 from CPAN and the latest snapshot from the web site. First, I was getting some warnings. Class::DBI (0.96) was warning about the 'sort' parameter being deprecated in favour of 'order_by'. The first patch attached makes the change, although it will presumably break compatability with pre-0.96 Class:DBI. I was also seeing some warnings from line 127 of Siesta.pm because $Siesta::Config::LOG_LEVEL was undefined, due to the fact that I don't have a /usr/local/siesta/siesta.conf file yet. The second patch changes Config.pm.in to call a setup method to set the package variable to their default values even if the config file doesn't exist. I created a new setup() method but left the original load_from() intact, just in case it's currently being used in other parts of code. I also added C<use Siesta::Config> to Siesta.pm, as implemented in the third patch. I suspect that this may not be the right thing to do, but it seems to solve the immediate problem. Now, having got all that out of the way, I'm still seeing a couple of errors. Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/09defer.t 255 65280 22 6 27.27% 17-22 t/09plugin_order.t 255 65280 11 2 18.18% 10-11 t/20fullsend.t 2 512 1 1 100.00% 1 Failed 3/18 test scripts, 83.33% okay. 9/222 subtests failed, 95.95% okay. The first two fail with a Class::DBI call_trigger() method failure. t/09defer...................ok 16/22Can't locate object method "call_trigger" via package "Class::DBI::Object::Has::Been::Deleted" at /usr/local/lib/perl5/site_perl/5.8.0/Class/DBI.pm line 723, <DATA> line 12. t/09plugin_order............ok 9/11Can't locate object method "call_trigger" via package "Class::DBI::Object::Has::Been::Deleted" at /usr/local/lib/perl5/site_perl/5.8.0/Class/DBI.pm line 723. The third complains thusly: t/20fullsend................Siesta::Plugin::process called directly at /home/abw/projects/siesta/Siesta-0.65-abw/blib/lib/Siesta/Plugin.pm line 44. A cursory glance at the code for either of these problems doesn't offer any enlightenment. I suspect the Class::DBI problem is another version compatibility problem, but I can't track it down. Any clues gratefully received. It looks like most of it works so I'll press on. A --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=siesta-abw-patch1 --- Siesta-0.65/lib/Siesta/List.pm 2003-08-13 14:07:43.000000000 +0100 +++ Siesta-0.65-abw/lib/Siesta/List.pm 2004-05-21 13:29:17.000000000 +0100 @@ -13,7 +13,7 @@ # this is a bit funny, never mind __PACKAGE__->has_many( _plugins => 'Siesta::Plugin', 'list', - { sort => 'rank' } ); + { order_by => 'rank' } ); =head1 NAME --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=siesta-abw-patch2 --- Siesta-0.65/Config.pm.in 2003-09-01 16:21:49.000000000 +0100 +++ Siesta-0.65-abw/Config.pm.in 2004-05-21 13:46:25.000000000 +0100 @@ -92,10 +92,20 @@ =cut +# old method kept for posterity in case anything is using it... + sub load_from { - shift; + my $self = shift; my $file = shift; $config->file($file); + $self->setup($config); +} + +# new method to set package vars from $config object + +sub setup { + shift; + my $config = shift; @STORAGE = ($config->get('storage_dsn'), $config->get('storage_user'), @@ -107,6 +117,7 @@ } + BEGIN { $ROOT = '@@ROOT@@'; $CONFIG_FILE = '@@ROOT@@/siesta.conf' unless defined $CONFIG_FILE; @@ -142,7 +153,8 @@ DEFAULT => undef, }, ); - __PACKAGE__->load_from( $CONFIG_FILE ) if -e $CONFIG_FILE; + $config->file( $CONFIG_FILE) if -e $CONFIG_FILE; + __PACKAGE__->setup( $config ); } 1; --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=siesta-abw-patch3 --- Siesta-0.65/lib/Siesta.pm 2003-09-01 17:12:41.000000000 +0100 +++ Siesta-0.65-abw/lib/Siesta.pm 2004-05-21 13:42:50.000000000 +0100 @@ -6,6 +6,7 @@ use Siesta::List; use Siesta::Message; +use Siesta::Config; use IO::File; use File::Find::Rule qw/find/; --sdtB3X0nJg68CQEu--
Generated at 13:56 on 01 Jul 2004 by mariachi 0.52