Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: Finding max value from a unique tag from XML

by afoken (Abbot)
on Nov 26, 2012 at 19:32 UTC ( #1005750=note: print w/replies, xml ) Need Help??


in reply to Re^3: Finding max value from a unique tag from XML
in thread Finding max value from a unique tag from XML

$_[4] is the fifth element of @_, the array containing subroutine arguments. $_[4] is used in both subroutines in the @rules array, and it is used as a hash reference. The @rules array is passed to XML::Rules->new(...). I would expect XML::Rules to call one or both of the subroutines while parsing the XML document.

And, lo and behold, XML::Rules does call the subroutines passed in @rules. The documentation clearly states that the fifths parameter is the parser object (a blessed hash reference), documented with the name $parser. It offers two workspaces, $parser->{'pad'} and $parser->{'parameters'} to "store any data you need".

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^5: Finding max value from a unique tag from XML
by vagabonding electron (Chaplain) on Nov 29, 2012 at 16:37 UTC
    Danke!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005750]
help
Chatterbox?
[gnosti]: Hi, Looking for a module that can add HH:MM:SS durations like 1:40, 1:00:24.13 and 12.3? I see on CPAN more modules with absolute dates. TIA
[kcott]: s/imput/input/
[Corion]: DateTime::Duration ? Personally,I convert stuff to seconds using Time::Piece or Time::Local and then add the seconds and then use POSIX::strftime to print them as hours again
[marto]: good morning all, TCIF
[gnosti]: I'm reading from ffmpeg lengths of video clips in H:M:S and needing to add them and format them back to H:M:S for feeding back to ffmpeg
[marioroy]: kcott Thanks
[Corion]: gnosti: I would cheat and use my approach instead of dealing with durations as objects, or a module

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2017-08-18 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (297 votes). Check out past polls.

    Notices?