Re: [XML::Parser] Global variable doesn't change

"Jenda Krynicky" <[email protected]> Thu, 14 Mar 2013 21:55:19 +0100
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
From:           	Kiem-Hieu Nguyen <[email protected]>
> Hi,
> I hope you could help me with this issue: I have a global variable, 
> says a hash. In a handler of the parser I make change to the variable 
> and its values changes indeed, says adding element to the hash. However, 
> after finishing the parsing, the hash returns to emty. What I want is 
> keeping the changes made during the parsing.
> Thanks in advance! And it's great using XML::Parser!
> Hieu.
> 
> -- 
> Kiem-Hieu Nguyen

My crystal ball is malfunctioning, I can't help you without seeing 
the code.

A few questions and wild guesses ... 
You are using "use strict", right?
Are you sure you are using the global hash in the handlers? If you 
add something into the hash before the parsing, do you see it from 
within the handlers? Any "package" statements? Any "local"?

Jenda
===== [email protected] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
	-- Terry Pratchett in Sourcery

_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs