[jifty-devel] Re: [Jifty-commit] r2084 - jifty/trunk/lib/Jifty/Action

Gaal Yahas gaal at forum2.org
Mon Oct 30 10:10:15 EST 2006


It's in something I still haven't figured out totally:

I have an action that's a subclass of J::A::R::Update, *and* I want to
augment it with an action param schema of my own. What happened was that
my sub record_class {} needed to come before defining the schema, and
when it didn't, I was getting that error.


On Mon, Oct 30, 2006 at 09:53:07AM -0500, Jesse Vincent wrote:
> 
> I 100% appreciate the improved error message, but how did you run into
> the error condition?
> 
> -j
> 
> On Mon, Oct 30, 2006 at 03:08:11AM -0500, jifty-commit at lists.jifty.org wrote:
> > Author: gaal
> > Date: Mon Oct 30 03:08:10 2006
> > New Revision: 2084
> > 
> > Modified:
> >    jifty/trunk/lib/Jifty/Action/Record.pm
> > 
> > Log:
> > improve an error message
> > 
> > Modified: jifty/trunk/lib/Jifty/Action/Record.pm
> > ==============================================================================
> > --- jifty/trunk/lib/Jifty/Action/Record.pm	(original)
> > +++ jifty/trunk/lib/Jifty/Action/Record.pm	Mon Oct 30 03:08:10 2006
> > @@ -42,7 +42,11 @@
> >  
> >  sub record_class {
> >      my $self = shift;
> > -    $self->log->fatal("Jifty::Action::Record must be subclassed to be used");
> > +    my $class = ref $self;
> > +    my $hint = $class eq __PACKAGE__ ? "" :
> > +        " (did you forget to override record_class in $class?)";
> > +    $self->log->fatal("Jifty::Action::Record must be subclassed to be used" .
> > +        $hint);
> >  }
> >  
> >  =head2 new PARAMHASH
> > _______________________________________________
> > Jifty-commit mailing list
> > Jifty-commit at lists.jifty.org
> > http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-commit
> > 
> 
> -- 
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel

-- 
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/


More information about the jifty-devel mailing list