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:

            $obj =
                $self->create_from_cgi( $h =>
{ required => $r->{config}{ $r->{table} } {required_cols} || [], }
            );
            warn Dumper $obj;
# error log shows what you would expect, i.e: $VAR1 = bless( { 'id' => '155' }, 'CokeWorks::Content' );
            warn $obj->title; #where title is a valid col in the db
# leads to the highly informative error: "Warning: something's wrong at /Library/Perl/5.8.6/Maypole/Model/CDBI.pm line 125."


So overall, I think this is a case of CDBI::Loader not playing nicely with Maypole's conception of what should be going on.

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-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users

Reply via email to