[Omaha.pm] XML::Twig usage
Jay Hannah
jhannah at omnihotels.com
Wed Jul 21 09:25:31 PDT 2010
Oh! :)
Searching the XML::Twig POD for "att" the very first hit says, quote:
Other useful methods include:
att: "$elt->{'att'}->{'foo'}" return the "foo" attribute for an
element,
So for all these years I've assumed there was no public accessor method
for attributes. :)
Live and learn! Thanks!
I find the POD confusing. ->{'att'} is not a *method* at all, so why he
calls that a "useful method" is beyond me. -shrug-
j
________________________________
From: Sean Baker
Sent: Wednesday, July 21, 2010 9:08 AM
Works:
my $att = $pack->{att}->{postingRhythm}
Works better:
my $att = $pack->att("postingRhythm");
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/omaha-pm/attachments/20100721/17206c91/attachment.html>
More information about the Omaha-pm
mailing list