Re: [MP2] eval and exit(0) : problem

2004-05-03 Thread Stas Bekman
Glenn wrote: On Mon, May 03, 2004 at 07:17:54PM +0200, Arnaud Blancher wrote: Stas Bekman a ?crit : Arnaud Blancher wrote: Stas Bekman a ?crit : ydnar wrote: The eval() is unecessary. The named sub can be used: &$func(); yes but not with use strict ... try: { no strict 'refs'; &$func();

Re: [MP2] eval and exit(0) : problem

2004-05-03 Thread Glenn
On Mon, May 03, 2004 at 07:17:54PM +0200, Arnaud Blancher wrote: > Stas Bekman a ?crit : > > >Arnaud Blancher wrote: > > > >>Stas Bekman a ?crit : > >> > >>>ydnar wrote: > >>> > The eval() is unecessary. The named sub can be used: > > &$func(); > >>> > >>> > >>> > >>yes but not with

Re: [MP2] eval and exit(0) : problem

2004-05-03 Thread Stas Bekman
Arnaud Blancher wrote: [...] try: { no strict 'refs'; &$func(); } yes, it's work. i'don't realy like this solution, just because i always try to use 'use strict' to avoid problem with mod_perl But in this case, it disables strict refs only for a very small scope! It doesn't affe

Re: [MP2] eval and exit(0) : problem

2004-05-03 Thread Arnaud Blancher
Stas Bekman a écrit : Arnaud Blancher wrote: Stas Bekman a écrit : ydnar wrote: The eval() is unecessary. The named sub can be used: &$func(); yes but not with use strict ... try: { no strict 'refs'; &$func(); } yes, it's work. i'don't realy like this solution, just because i alwa

Re: [MP2] eval and exit(0) : problem

2004-04-30 Thread Stas Bekman
Arnaud Blancher wrote: Stas Bekman a écrit : ydnar wrote: The eval() is unecessary. The named sub can be used: &$func(); yes but not with use strict ... try: { no strict 'refs'; &$func(); } FWIW, I find $func->() to be a more readable syntax. You don't need to load anything. I

Re: [MP2] eval and exit(0) : problem

2004-04-30 Thread Arnaud Blancher
Stas Bekman a écrit : ydnar wrote: The eval() is unecessary. The named sub can be used: &$func(); yes but not with use strict ... mod_perl remaps exit() to ModPerl::Util::exit(). Are you sure the right modules are being loaded? You don't need to load anything. Indeed under mp2: *CORE:

Re: [MP2] eval and exit(0)

2004-04-29 Thread Stas Bekman
ydnar wrote: The eval() is unecessary. The named sub can be used: &$func(); mod_perl remaps exit() to ModPerl::Util::exit(). Are you sure the right modules are being loaded? You don't need to load anything. Indeed under mp2: *CORE::GLOBAL::exit = \&ModPerl::Util::exit; And you don't need to

Re: [MP2] eval and exit(0)

2004-04-29 Thread Arnaud Blancher
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 ha

Re: [MP2] eval and exit(0)

2004-04-29 Thread ydnar
The eval() is unecessary. The named sub can be used: &$func(); mod_perl remaps exit() to ModPerl::Util::exit(). Are you sure the right modules are being loaded? 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 i