[Catalyst] detach behaviour clarification

Jonathan Rockway jon at jrock.us
Thu Nov 1 18:28:28 GMT 2007


Geoff Flarity wrote:
> Please consider the following example:
>
> sub one : Local {
>   my ($self, $c ) =3D @_;
>   $c->forward( '_two')
>   $c->stash->{template} =3D 'one.tt2'
> }
>
> sub two : Private {
>   my ($self, $c ) =3D @_;
>   $c->detach('_three');
>   $c->stash->{template} =3D 'two.tt2'
> }
>
> sub three : Private {
>  my ($self, $c ) =3D @_;
>  $c->stash->{template} =3D 'three.tt2';
> }
>
> My current understanding is that the value of template should be
> three.tt2. Is this correct? =


It would be if you forwarded to 'two' and detached to 'three'.  You are
using '_two' and '_three'.

Regards,
Jonathan Rockway

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 370 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071101/93f9=
7afb/signature.pgp


More information about the Catalyst mailing list