[Catalyst] Access context from within filter sub? (TT)

Jonathan Hall jonh at nmgi.com
Mon Sep 22 16:55:54 BST 2008


Sure, if you pass it in...

i.e. in your sub definition:

sub foo {
  my ( $c ) = @_;
  . . .
}

And in your TT2:

[% foo( Catalyst ); %]

Oliver Block wrote:
> Hello group,
>
> I wonder if it's possible to access the the context from within a sub serving
> as filter for mytemplate.tt2?
>
> Is that possible?
>
> tia,
>
> Oliver Block
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>   


-- 
Inbound and outbound email scanned for spam and viruses by the

DoubleCheck Email Manager: http://www.doublecheckemail.com



More information about the Catalyst mailing list