Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: XML::Simple oddness

by lindex (Friar)
on May 16, 2001 at 07:12 UTC ( #80794=note: print w/ replies, xml ) Need Help??


in reply to Re: XML::Simple oddness
in thread XML::Simple oddness

That code was not cut and paste, I am aware of how scope works inside mod_perl $r was just an example of a Apache::Request object and is defined correctly.

I am almost sure that this problem is not coming from my code, considering that I am using XML::Simple in the same way outside of mod_perl and it works correctly

p.s. yes everything is defined with a my()


lindex


Comment on Re: Re: XML::Simple oddness
Re: Re: Re: XML::Simple oddness
by chipmunk (Parson) on May 16, 2001 at 07:35 UTC
    Woops... Not sure why I focused on $r, which shouldn't be related to the problem here. Sorry. :)

    All of your variables are declared with my... Are any of the variables declared outside of a subroutine, and then used inside a subroutine?

    my $var = rand; sub do_something { print "$var\n"; }
    That will lead to the 'Variable "$var" will not stay shared' error, and $var in do_something will keep the same value it had the first time do_something was called, including previous calls from earlier executions of the script in the same mod_perl fork.

    Since the behavior is different under mod_perl, my first thought is to check on the differences between running normally and running under mod_perl... If that's not it, I'll work on thinking of other possible causes for this odd behavior. Although at that point you may want someone with more experience with the XML modules. :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (16)
As of 2014-08-27 15:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (242 votes), past polls