[Catalyst] Forwarding to public URLs vs. private paths

Matt S Trout dbix-class at trout.me.uk
Mon Oct 16 23:13:18 CEST 2006


Bernhard Graf wrote:
> I'm trying Cat's chained paths and I like it quite much.
> 
> One thing I recognized is that you can't forward to a chained path.
> 
> Take the Hello-World example in Catalyst::DispatchType::Chained.
> When I add
> 
>   sub index : Private {
>     my ( $self, $c ) = @_;
>     $c->forward('/hello/47/world/11');
>   }
> 
> then for http://my.host/greeting I get
> Couldn't forward to command "/hello/47/world/11": Invalid action or component.
> 
> Is this a bug or is there a reason why this cannot work?

Public URLs are not private paths. This doesn't work, has never worked, and 
will never work, by design.

Trying to forward to a MyApp::Controller::Foo sub bar :Path('/spoon') as 
/spoon won't work either, you'd need /foo/bar.

This is consistent across all dispatch types and is neither anything to do 
with Chained for a bug :)

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Catalyst mailing list