Jason Kohles wrote:
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.

Where does the documentation say that? In Catalyst::DispatchType::Chained it says

  Another interesting possibility gives :Chained('.'), which chains
  itself to an action with the path of the current controller's
  namespace.

and then shows two actions for two different controllers. You only have one controller.

Try something like this:

  package MyApp::Controller::Foo;
  use strict;
  use base 'Catalyst::Controller';

  # is chained to
  sub bar : Chained CaptureArgs(0) { }

  1;

and

  package MyApp::Controller::Foo::Bar;
  use strict;
  use base 'Catalyst::Controller';

  # chains to /foo/bar, like this controllers namespace
  sub baz : Chained('.') { }

  1;

Although, this is untested, of course. But you can always take a look at the Chained tests.

--
# Robert 'phaylon' Sedlacek
# Perl 5/Catalyst Developer in Hamburg, Germany
{ EMail => ' [EMAIL PROTECTED] ', Web => ' http://474.at ' }

_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Reply via email to