On 23 Jul 2011, at 02:52, Alain Wan wrote:

The code is as follows:

app.pm:

package app;

use Apache2::RequestRec ();
use Apache2::RequestIO ();

use Apache2::Const -compile => qw(OK);


Why are you importing any of this stuff?

You should let Catalyst take care of loading the engine etc itself.

use Moose;
use namespace::autoclean;

BEGIN { extends 'Catalyst::Controller::REST' }

    sub hello :Local :ActionClass('REST') {
      print "handler entered\n";
    }


Don't put actions in the root application class! It should work currently, but it's not been generated by the helper for > 3 years, and it'll stop working in an upcoming major release!

Please start with the template generated by catalyst.pl, which will give you an app::Controller::Root.

Although I'd suggest 'app' isn't the best namespace for your application :)

Cheers
t0m



_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to