On 21 Dec 2005, at 13:18, Kieren Diment wrote:
OK, the do_edit override is also stuffed in a way I can't easily
resolve.
debugging with warn Dumper statements in MM::CDBI it turns out
everything is going hunky dory, but we come to the following
section of do_edit:
So overall, I think this is a case of CDBI::Loader not playing
nicely with Maypole's conception of what should be going on.
I'll work up some beerdb tests today, and put them up on rt.
On the subject of maypole-install versus Class::DBI::Loader, my
suspicion is that while Loader is neat, it makes things terribly
difficult to debug because there are two levels of generated code.
Using Plain would make it much easier to put debug hooks into the
application to examine what's going on.
On a similar note, getting maypole-install working properly would
logically lead to deprecating the use of Loader, with an error
message something like this appearing in the errror logs:
"You are using Class::DBI Loader to generate some of the code for
this application. This is deprecated for maintenance/debugging
reasons. Use the script maypole-install (available in $bindir or via
CPAN) to convert to CDBI::Plain which will make your application much
easier to debug. If you want to continue using CDBI::Loader, and you
don't want your error log to fill up with this message, put $myapp-
>config->no_loader_warn(1) in the configuration section of your
application."
On a related note, I tried Simon Cozens' maypole-install helper
script and got the following error when starting up the auto
generated app.
Recursive inheritance detected while looking for method 'isa' in
package 'Class::Accessor::Fast' at /System/Library/Perl/5.8.6/
base.pm line 74.\nBEGIN failed--compilation aborted at /usr/local/
src/coal/Coal/DBI.pm line 4.\nCompilation failed in require at /usr/
local/src/coal/Coal.pm line 4.\nBEGIN failed--compilation aborted
at /usr/local/src/coal/Coal.pm line 4.\nCompilation failed in
require at (eval 19) line 3.\n
[Wed Dec 21 13:17:03 2005] [error] Recursive inheritance detected
while looking for method 'AUTOLOAD' in package 'Class::Accessor'.\n
On 21 Dec 2005, at 12:03, Kieren Diment wrote:
Made some progress on this one.
I think that I found some poor coding in
Maypole::Model::CDBI::search, and it does seem to be a CDBI
problem, but one that is interacting with Class::DBI::Loader.
the first lines of Maypole::Model::CDBI::search are:
return shift->SUPER::search(@_) if caller ne
"Maypole::Model::Base";
my ( $self, $r ) = @_;
and since the caller is my module not Maypole::Model::Base, it
uses My::Module::search which complains about invalid sql.
Since this is generated on the fly by Loader, or CDBI, I don't
understand how to debug this sub.
So I'm going to have to live with some cut and paste code for now.
now to check the problem overriding calling do_edit from a
different exported method. Which I'm less hapy with the cut and
paste work around for.
On 20 Dec 2005, at 15:29, Kieren Diment wrote:
Working on this SSIsearch thing, I had:
sub SSIsearch : Exported {
my ( $self, $r ) = @_;
$r->{template_args}{ssi} = 1;
$self->search($r);
}
which doesn't work. The error log fills up with (unfortunately
illegible) information about an error in my sql syntax. I'm
pretty sure there aren't any reserved words in my table either.
However, it all works fine when I cut and paste the search method
from Maypole::Model::CDBI.
Any ideas?
kd
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep
through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD
SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through
log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD
SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Maypole-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-devel