
hz at hzlabs
Apr 19, 2004, 1:00 AM
Post #3 of 4
(2218 views)
Permalink
|
|
Re: Trouble with the arrow operator("->") in custom tags
[In reply to]
|
|
Maybe ${$Session}{'User'} helps? Helmut --On Sunday, April 18, 2004 22:33:36 -0700 Christopher Brown <chris.brown [at] cal> wrote: > Hi, > > This could be really simple or really easy. > > I want to write a custom tag that renders the content of the tag only if > the 'test' argument evaluates to be true. I want it to work something > like this: > > <asp:Test test="$Session->{User}"> > The Session User Object Exists > </asp:Test> > > > Where the Perl code is: > > sub asp::Test { > > my ($args, $content) = @_; > > if ( eval( $args->{test} ) != 0 ) { > $Response->Write("$content"); > } > > } > > The problem here is that the parser recognizes the ">" of the arrow > operator "->" as the tag closure. Has anyone experienced similar > troubles? Is there a good (easy) solution? > > Thanks In Advance, > > Chris > > --------------------------------------------------------------------- To unsubscribe, e-mail: asp-unsubscribe [at] perl For additional commands, e-mail: asp-help [at] perl
|