[Catalyst] Re: Newbie question on debugging inside a schema

Aristotle Pagaltzis pagaltzis at gmx.de
Sat Jan 16 16:31:35 GMT 2010


* Steve Kleiman <steve at prodhub.com> [2010-01-16 13:15]:
> I gather it's Bad to pass in $c so that within a schema I can't
> do what I'd really like which is:
>     $c->log->warn('some useful debug info');

Pass in $c->log and do:

     $log->warn('some useful debug info');

In your testsuite you can pass a Class::Null object.

-- 
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1}
&Just->another->Perl->hack;
#Aristotle Pagaltzis // <http://plasmasturm.org/>



More information about the Catalyst mailing list