Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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
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
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 making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2015-08-29 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (343 votes), past polls