[cgiapp] add_callback problem when using Plugin::JSON
Michael Peters
mpeters at plusthree.com
Thu Jan 29 10:39:38 EST 2009
kropotkin wrote:
't locate object method "add_callback" via package "MyPackage" at
> /usr/lib/perl5/site_perl/5.8.8/CGI/Application/Plugin/JSON.pm line 232
>
> This is my code:
>
> use CGI::Application::Plugin::JSON ':all';
> $JSON::Any::UTF8 = 1;
> return $self->json_body({text => 'test', fail => (my $filefail ?
> 'fail' : 'ok')});
You need to use a CGI::Application::Plugin::* module within a CGI::Application based object.
Otherwise it can't add the appropriate methods or callbacks.
--
Michael Peters
Plus Three, LP
More information about the cgiapp
mailing list