develooper Front page | perl.perl5.porters | Postings from April 2011

XML::Simple vs. "tied handle" deprecation warning in v5.14.0-RC1

From:
George Greer
Date:
April 28, 2011 13:04
Subject:
XML::Simple vs. "tied handle" deprecation warning in v5.14.0-RC1
Message ID:
alpine.LFD.2.02.1104281556320.20327@ein.m-l.org
This could be a little confusing:

Use of tied on a handle without * is deprecated at /home/ggreer/bin/perlbrew/perls/perl-5.14.0-RC1/lib/site_perl/5.14.0/x86_64-linux/XML/Parser/Expat.pm line 447.

XML/Parser/Expat.pm line 447:
     } elsif (tied($arg)) {

from
XML/Parser.pm line 187:
     $result = $expat->parse($arg);

from
XML/Simple.pm line 410:
     $tree = $xp->parse(*XML_FILE);

D'oh!

It's much happier with:
     $tree = $xp->parse(\*XML_FILE);

-- 
George Greer



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About