--- Jesse Sheidlower <jester at panix.com> wrote:
>
> Before I spend too much time debugging this, I thought someone
> might have run into this and could help out.
>
> I just upgraded Maypole from 1.7 to 2.04. Several applications
> were unaffected, but one relatively complex one, which has some
> authentication juju going on, had problems. I'm now throwing
> errors of the sort:
>
> caught authenticate error: Can't call method "can" on an undefined
> value at...
>
> with the relevant line, in the main module, being
>
> return $r->model_class->sub_authenticate($r)
> if $r->model_class->can("sub_authenticate");
>
What's the main module? You're driver? Are you going to a page that doesn't
have a model class associated with it like a straight template? Wrap above
code in an "if ($r->model_class) { warn "No model classs in sub authenticate;
.. . } and see if everything works ok. Check error log for warnings and see
what situations you get the warning. Maybe maypole 1.7 returns the base model
class name if there is no model class and that's why you're getting an error in
2.04.
> Backing out 2.04 in favor of 1.7 fixes the problem.
>
> Anyone run into this before, or know the obvious place
> to start?
>
> Jesse Sheidlower
>
> _______________________________________________
> maypole mailing list
> maypole at lists.netthink.co.uk
> http://lists.netthink.co.uk/listinfo/maypole
>
This is not earth shattering info but maybe it will help if you don't know
this:
$r-model_class is the class name of the object/table your working with. Example
Beer or Brewery. It gets set first thing in Maypole::handler_guts It is not
getting set for some reason. Either bad things are happening or there is no
model_class associated with the page, ie its a straight template.
First make sure you have a class associated with that table. Maypole uses the
model->class_of method to determine the class from the table name. see
Maypole::Model::CDBI and Maypole::handler_guts sub.
start at that point and work your way back to see why maypole doesn't get the
model_class. YOu could try the Maypole Command Line debugger and run through it
and diagnose the problem.
=====
pjs
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com
_______________________________________________
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