Johan Lindstrom wrote:
> It appears I may have broken my CDBI installation earlier when adding
> debug code. I reinstalled CDBI 0.96 and now the delete works fine.
That's great. So it was the libraries, but nothing anybody has to worry
about.
> 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.
There are few people using Maypole on Windows so it's good to hear that
it's working for you.
> 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?
It's one of the [broken] lines you quoted below :)
$r->objects([ $class->fetch_objects($r) ]);
> 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.
Well spotted. I see it's been fixed in the 2.07 pre-release. I'm not
sure why there's no use strict, though.
Cheers, Dave
_______________________________________________
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