[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] XML::Twig usage



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”);