Thanks, things are starting make more sense :)
Geoff
On 11/1/07, Antano Solar <[EMAIL PROTECTED]> wrote:
>
>
>
> On 11/1/07, Geoff Flarity <[EMAIL PROTECTED]> wrote:
> >
> > Hi everyone,
> >
> > I've seem to run into a behavior discrepancy between the included dev
> > server and apache when using $c->detach. But I'd like to confirm my
> > understanding of exactly how detach should behave before I debug any futher.
> > Please consider the following example:
> >
> > sub one : Local {
> > my ($self, $c ) = @_;
> > $c->forward( '_two')
> > $c->stash->{template} = 'one.tt2'
> > }
> >
> > sub two : Private {
> > my ($self, $c ) = @_;
> > $c->detach('_three');
> > $c->stash->{template} = 'two.tt2'
> > }
> >
> > sub three : Private {
> > my ($self, $c ) = @_;
> > $c->stash->{template} = 'three.tt2';
> > }
> >
> > My current understanding is that the value of template should be
> > three.tt2. Is this correct?
> >
> > Thanks,
> > Geoff
> >
> > No !
> When you use forward unlike detach the statements that follow the forward
> are also executed.
> Which means , the last statement to be executed should be
> $c->stash->{template} = ' one.tt2'
>
> Antano Solar John
>
>
>
> _______________________________________________
> List: [email protected]
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/[EMAIL PROTECTED]/
> Dev site: http://dev.catalyst.perl.org/
>
>
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
Dev site: http://dev.catalyst.perl.org/