Reputation: 1018
I'm just trying eval for the first time, and get a compilation error for the following piece of code:
my $dom;
eval {
$dom = $PRSR->load_xml(location => $fullpathname, no_blanks => 1);
}
my $dtlDocType = getObjectType($dom); # <----- the error occurs here
It says "Global symbol $dtlDocType requires explicit package name". When I remove the eval and let the line setting $dom stay without a block, it works. Initializing $dom in the first line to anything doesn't make any difference.
What is the problem?
Upvotes: 0
Views: 529