Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: XML::Rules: Can hierarchy be changed?

by Jenda (Abbot)
on Sep 30, 2010 at 07:56 UTC ( #862761=note: print w/ replies, xml ) Need Help??


in reply to Re: XML::Rules: Can hierarchy be changed?
in thread XML::Rules: Can hierarchy be changed?

sub { $_[1]->{text} = $_[1]->{_content}, delete $_[1]->{_content}, ret +urn ($_[0] => [$_[1]] , [$_[0] => $_[1]])}
is better written as
sub { $_[1]->{text} = $_[1]->{_content}; delete $_[1]->{_content}; ret +urn ($_[0] => [$_[1]] , [$_[0] => $_[1]])}
You can put several statements into an anonymous subroutine so no need to use commas where you mean semicolons :-)

Jenda
Enoch was right!
Enjoy the last years of Rome.


Comment on Re^2: XML::Rules: Can hierarchy be changed?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://862761]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (18)
As of 2015-07-01 17:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (13 votes), past polls