I'm having a strange problem that I believe only occurs under Embperl, but
I'm not sure.
I have an epl page that is called (Execute) by a mod_perl page.
Here are the contents of the epl: (please read the comments)
[.-
$app = shift @param; # this is confirmed to be a string 'query_results'
use lib '../../';
eval "use perllib::$app"; print $@ if $@;
use IO::Scalar;
$s = undef;
tie *OUT, 'IO::Scalar', \$s; # override OUT handle so that print statements
will go to $s
$SaveSTDOUT = select; # save current handle
select OUT; # set default handle so that "print" without a handle will
default to this
eval "$app::main()"; print $@ if $@; #this doesn't work!
#query_results::main(); #this works
select $SaveSTDOUT; # restore original handle
$escmode = 0; #don't escape html tags (in $s)
-]
[+ $s +]
I've successfully used eval the same way under normal mod_perl scripts.
I would appreciate any help on this.
thank you.
Ilia Lobsanov.
I'm not sure.
I have an epl page that is called (Execute) by a mod_perl page.
Here are the contents of the epl: (please read the comments)
[.-
$app = shift @param; # this is confirmed to be a string 'query_results'
use lib '../../';
eval "use perllib::$app"; print $@ if $@;
use IO::Scalar;
$s = undef;
tie *OUT, 'IO::Scalar', \$s; # override OUT handle so that print statements
will go to $s
$SaveSTDOUT = select; # save current handle
select OUT; # set default handle so that "print" without a handle will
default to this
eval "$app::main()"; print $@ if $@; #this doesn't work!
#query_results::main(); #this works
select $SaveSTDOUT; # restore original handle
$escmode = 0; #don't escape html tags (in $s)
-]
[+ $s +]
I've successfully used eval the same way under normal mod_perl scripts.
I would appreciate any help on this.
thank you.
Ilia Lobsanov.