In a message dated 2007-8-15 23:24:44 中国标准时间, [EMAIL PROTECTED] writes:
In addition to all the other replies, and if die() in mod_perl is your
actual concern, please read
http://perl.apache.org/docs/1.0/guide/porting.html#die___and_mod_perl
exit(), OTOH, is a mod_perl issue that needs to
[ A while ago I commented on the same question in beginners-cgi, without
knowing about the discussion here. Please do not multi-post!!
http://lipas.uwasa.fi/~ts/http/crospost.html ]
Jeff Pang wrote:
Yes that's fine.
I think when we say 'use Apache qw/exit/' in modperl scripts,it may
do the sa
Jeff Pang wrote:
From: Xavier Noria <[EMAIL PROTECTED]>
On Aug 13, 2007, at 9:29 AM, Jeff Pang wrote:
Does die call exit when it's excuted?
If so,when I overwrote exit() function in my script,would die call
this customized
exit?
Do you want some code executed if the program dies?
No.I
Jeff Pang wrote:
Does die call exit when it's excuted?
If so,when I overwrote exit() function in my script,would die call this
customized
exit?
See the section "Overriding Built-in Functions" in:
perldoc perlsub
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-o
Thank you.That explained what I want to know.
--Jeff Pang
** Get a sneak peek of the all-new AOL at
http://discover.aol.com/memed/aolcom30tour
On Aug 13, 2007, at 1:57 PM, Jeff Pang wrote:
Yes that's fine.
I think when we say 'use Apache qw/exit/' in modperl scripts,it may
do the same things as you mentioned -- modify the typeglob directly
-- but I'm not so sure.
I don't know too much XS but looks like this code in src/modules/pe
-Original Message-
>From: Paul Johnson <[EMAIL PROTECTED]>
>Sent: Aug 13, 2007 7:45 PM
>To: Jeff Pang <[EMAIL PROTECTED]>
>Cc: Paul Lalli <[EMAIL PROTECTED]>, beginners@perl.org
>Subject: Re: die and exit
>
>On Mon, Aug 13, 2007 at 07:24:56PM +
On Mon, Aug 13, 2007 at 07:24:56PM +0800, Jeff Pang wrote:
> >> sub exit {
> >> print "test exit";
> >> exit;
> >> }
> >
> >This does not "overwrite" exit. Your own subroutine &exit and the
> >built-in CORE::exit() are not the same thing.
>
> Then how to overwrite CORE::exit?
> Can anybo
-Original Message-
>From: Paul Lalli <[EMAIL PROTECTED]>
>Sent: Aug 13, 2007 7:06 PM
>To: beginners@perl.org
>Subject: Re: die and exit
>
>On Aug 13, 3:29 am, [EMAIL PROTECTED] (Jeff Pang) wrote:
>> Does die call exit when it's excuted?
>> If
On Aug 13, 3:29 am, [EMAIL PROTECTED] (Jeff Pang) wrote:
> Does die call exit when it's excuted?
> If so,when I overwrote exit() function in my script,would die call this
> customized
> exit?
> sub exit {
> print "test exit";
> exit;
> }
This does not "overwrite" exit. Your own subrouti
there is a difference between the function exit:
perldoc -f exit
and a sub you have defined by your own. even if you re-use a name of a
build-in. thats why you called exit via &exit; and not exit; or exit();
#!/usr/bin/perl -w
sub exit(){
print "sub exit called\n";
}
&exit;
&exit();
if ($
-Original Message-
>From: Xavier Noria <[EMAIL PROTECTED]>
>Sent: Aug 13, 2007 3:43 AM
>To: beginners-list
>Subject: Re: die and exit
>
>On Aug 13, 2007, at 9:29 AM, Jeff Pang wrote:
>
>> Does die call exit when it's excuted?
>> If so,when I
On Aug 13, 2007, at 9:29 AM, Jeff Pang wrote:
Does die call exit when it's excuted?
If so,when I overwrote exit() function in my script,would die call
this customized
exit?
Do you want some code executed if the program dies? If that's the
case assign a coderef to $SIG{__DIE__}:
$SIG{_
On Sep 8, nafiseh saberi said:
>what is the difference between die and exit??
die() takes an error message and prints it to STDERR, and exit()s with a
failure (non-zero value). exit() takes a numeric value and sets that as
the success (zero) or failure (non-zero) value of your program.
--
Je
14 matches
Mail list logo