ydnar a écrit :

The eval() is unecessary. The named sub can be used:

&$func();

great, it's ok!



mod_perl remaps exit() to ModPerl::Util::exit(). Are you sure the right modules are being loaded?

i don't know. how can i know that ?


tank you very much Arnaud.



Arnaud Blancher wrote:

hi all,


I have a stange problem whith mod_perl 2. The script behing have a diferent result in perl/cgi than in mod_perl

so i don't know if i make a mistake whith perl/cgi or if it's a bug.

# in standad cgi, the output is

In first

# in mod_perl, the output is

In first
In second
I dont want to see this part !

# nothing in erreur log

#-----------------------------------
#!/usr/bin/perl

use CGI qw(:standard);

# &first();
my $func  = 'first';
eval "\&$func";
&second();

sub first {

 print header();
 print "In first<br>";

  exit(0);
}

sub second {

 print "In second<br>";
 print "I dont want to see this part !";

}

1;

#-----------------------------


if i write


&first();

and not

 my $func  = 'first';
 eval "\&$func";

all is ok.









-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to