[Catalyst] Anybody using Chained('.') ?
Jason Kohles
email at jasonkohles.com
Tue Mar 13 14:23:49 GMT 2007
I'm trying to use Chained('.') to create a controller base class that
binds to the namespace of whatever controller class inherits it, but
despite the documentation specifically mentioning this use, I can't
seem to get it to work.
I minimized the problem down to this simplest of examples...
% catalyst.pl Test
% cd Test
% cat <<END > lib/Test/Controller/Foo.pm
package Test::Controller::Foo;
use strict;
use warnings;
use base 'Catalyst::Controller';
# This doesn't work
sub base : Chained('.') PathPart('') CaptureArgs(0) { }
sub arghhh : Chained('base') PathPart('') Args(0) { }
# This doesn't work either
sub foo : Chained('.') PathPart('foo') Args(1) { }
1;
END
% script/test_server.pl
When it starts up, I get this...
[debug] Loaded Private actions:
.----------------------+--------------------------------------
+--------------.
| Private | Class |
Method |
+----------------------+--------------------------------------
+--------------+
| /default | Test::Controller::Root |
default |
| /end | Test::Controller::Root |
end |
| /foo/base | Test::Controller::Foo |
base |
| /foo/arghhh | Test::Controller::Foo |
arghhh |
| /foo/foo | Test::Controller::Foo |
foo |
'----------------------+--------------------------------------
+--------------'
[debug] Loaded Chained actions:
.-------------------------------------
+--------------------------------------.
| Path Spec |
Private |
+-------------------------------------
+--------------------------------------+
'-------------------------------------
+--------------------------------------'
And I don't seem to be able to get any chained actions working unless
they are chained to a specific path...
--
Jason Kohles
email at jasonkohles.com
http://www.jasonkohles.com/
"A witty saying proves nothing." -- Voltaire
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070313/6d0a4d34/attachment.htm
More information about the Catalyst
mailing list