Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by Anonymous Monk
on Oct 01, 2012 at 02:54 UTC ( #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;


Comment on Re: Debugging child pid 4577 exit signal Segmentation fault (11)
Download Code
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
Node Status?
node history
Node Type: note [id://996575]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2014-07-11 22:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (235 votes), past polls