The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Catalyst::Plugin::ChainedURI - Simple way to get an URL to an action from chained catalyst controller

VERSION

version 0.007

SYNOPSIS

# In the Root controller, for example:

sub base :Chained('/') :PathPart('') :CaptureArgs(1) :StashArg('language') {
	my ( $c, $language ) = @_;
	...
	$c->stash->{language} = $language;
	...
}

sub othercapture :Chained('base') :PathPart('') :CaptureArgs(1) { ... }
sub final :Chained('othercapture') :PathPart('') :Args(1) { ... }

# Somewhere

my $uri = $c->chained_uri('Root','final',$othercapture_capturearg,$final_arg);
my @current_chained_uri = $c->current_chained_uri; # current list
my $new_url = $c->chained_uri($c->current_chained_uri,{ more => 'params' });

# Usage hints

$c->stash->{u} = sub { $c->chained_uri(@_) }; # for getting [% u(...) %]

DESCRIPTION

TODO

Warning The function current_chained_uri doesn't work before you reach your target action.

SUPPORT

IRC

Join #catalyst on irc.perl.org and ask for Getty.

Repository

http://github.com/Getty/p5-catalyst-plugin-chaineduri
Pull request and additional contributors are welcome

Issue Tracker

http://github.com/Getty/p5-catalyst-plugin-chaineduri/issues

AUTHOR

Torsten Raudssus <torsten@raudss.us> http://raudss.us/

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Raudssus Social Software.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.