On Wed, 31 Oct 2001, Mike Eggleston wrote:
> I'm working on some [% PERL %] code and it needs access to the
> outer environment that it is called from and I'm trying to
> use $stash for that function.
>
> [% PERL %]
> $stash->set('time', time);
> [% END %]
>
> <br>
> The time now is [% time %] seconds since the epoch.
>
> Is $stash not the right variable or do I need to do something
> first so that it is setup for access or what?
>
> Also, what is the recommended method of debugging perl code
> within the template since perl -d is not available?
>
> Mike
Ok, I fat fingered that actual test. It does work if I have
the variable the same in both places. :)
The question about debugging still stands.
Also, if I have
[% PERL %]
print "<br>", $stash->get('name'), "\n";
[% END %]
I get a printed ....
never mind, I just tried it again and now it seems to be working.
Mike