On Sat, 8 Sep 2001, raptor wrote:
> | > use something like this :
> | >
> | > my $eval = join ( '', qq{
> | > package $package;
> | > use Apache qw(exit);
> | > $sub
> | > sub handler {
> | > $line
> | > $subname($r);
> | > };
> | > };
> | >
> | > just of my head... may have error.. or may don't work at all..
> |
> | what's $subname? you mean wrapping all the code into a sub and then
> | calling in? but that's exactly what's handler() doing. It doesn't change
> | anything, unless I didn't understand your proposal.
>
> ]- whatever.. but i see now that it is not worth-it... my idea was to get
> the user script outside of the handler() ...
> but what if we do this :
>
> my $eval = join ( '', qq{
> package $package;
> my $request;
> START:
> use Apache qw(exit);
> $usercode
> sub handler {
> $package::request = \$r;
> goto START;
> };
> };
>
> what other problems can arise !??
Hmm, that's an interesting idea. goto() can be very useful at times, even
if it's considered evil. Your solution seems to be too easy :) Gotta go to
sleep on it and see if there are some hidden issues with it.
I think you've missed the return status though, but this is easy to fix.
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]