Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Debugging child pid 4577 exit signal Segmentation fault (11)

by Anonymous Monk
on Oct 01, 2012 at 02:54 UTC ( [id://996575]=note: print w/replies, xml ) Need Help??


in reply to Debugging child pid 4577 exit signal Segmentation fault (11)

CGI to mod_perl Porting. mod_perl Coding guidelines

If the variable contains a reference it may hold onto lots of unecessary memory (or worse) if the reference is left to hang about until the next call to the same handler. For such variables you should use local so that the value is removed when the handler subroutine exits.

my $query = CGI->new; becomes: local our $query = CGI->new;

Replies are listed 'Best First'.
Re^2: Debugging child pid 4577 exit signal Segmentation fault (11)
by keenlearner (Acolyte) on Oct 01, 2012 at 07:45 UTC
    Hi, when I change the
    our $query = CGI->new;
    to
    local our $query = CGI->new;

    The $query var becomes undefined. the $query is a global variable in a module.

    I wonder why ?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://996575]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-04-23 11:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found