At 00:07 2005-01-24, Dave Howorth wrote:
>Perhaps most likely is that something in your other libraries is different
>to other peoples. What platform are you on? (I saw a C: in your log,
>quickly crosses himself).
Windows. I was worried about the cross-platformness of the SQLite db file,
but that seems to have worked fine.
>What version of Class::DBI and other libraries are you running?
perl -MMaypole -e "print Maypole->VERSION"
2.06
I don't know what others you are interested in, but from the Makefile.PL
dependencies:
perl -e 'eval qq/use $_/, printf(qq/%s: %s\n/, $_, $_->VERSION)
for(qw(Class::DBI::Loader Class::DBI::AbstractSearch Class::DBI::Pager
Class::DBI::Plugin::RetrieveAll Class::DBI::AsForm Class::DBI::FromCGI
Class::DBI::Loader::Relationship Class::DBI Class::DBI::SQLite CGI::Untaint
UNIVERSAL::moniker UNIVERSAL::require URI::QueryParam CGI::Simple
HTTP::Headers Template Template::Plugin::Class))'
Class::DBI::Loader: 0.11
Class::DBI::AbstractSearch: 0.05
Class::DBI::Pager: 0.06
Class::DBI::Plugin::RetrieveAll: 1.01
Class::DBI::AsForm: 2.41
Class::DBI::FromCGI: 0.94
Class::DBI::Loader::Relationship: 1.2
Class::DBI: 0.96
Class::DBI::SQLite: 0.04
CGI::Untaint: 1.25
UNIVERSAL::moniker: 0.07
UNIVERSAL::require: 0.03
URI::QueryParam:
CGI::Simple: 0.077
HTTP::Headers: 1.62
Template: 2.13
Template::Plugin::Class: 0.12
>To tie the problem down, under Maypole::CLI I'd single-step the
>Maypole::Model::CDBI::delete method into Class::DBI::delete and see if any
>variables look wrong. Your log seems to indicate something awry in the
>before_delete trigger.
I found something suspicious before the call to delete. The undef call is
in Maypole::Model::CDBI::delete, the $r->objects array contains an undef
value. So where does that come from?
This is the call stack:
Maypole::Model::CDBI::delete('BeerDB::Brewery','BeerDB=HASH(0x24c80ec)','undef',1)
called at .../site/lib/Maypole/Model/Base.pm line 19
Maypole::Model::Base::process('BeerDB::Brewery','BeerDB=HASH(0x24c80ec)')
called at .../site/lib/Maypole.pm line 113
...
It seems like there is something weird going on in
Maypole::Model::Base::process:
sub process {
my ( $class, $r ) = @_;
my $method = $r->action;
return if $r->{template}; # Authentication has set this, we're done.
$r->{template} = $method;
$r->objects([ $class->fetch_objects($r) ]);
$class->$method( $r, $obj, @{ $r->{args} } );
}
Where does that $obj variable come from? With use strict on, that's a
syntax error. It seems it broke between 2.04 and
2.05.http://search.cpan.org/src/SIMONFLK/Maypole-2.05/lib/Maypole/Model/Base.pm
http://search.cpan.org/src/SRI/Maypole-2.04/lib/Maypole/Model/Base.pm
I just found this so I haven't looked further into it.
/J
-------- ------ ---- --- -- -- -- - - - - -
Johan Lindström Sourcerer @ Boss Casinos johanl AT DarSerMan.com
Latest bookmark: "TCP Connection Passing"
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12
_______________________________________________
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