Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: xluke_repwalker.pl

by mirod (Canon)
on Mar 19, 2001 at 20:26 UTC ( [id://65444]=note: print w/replies, xml ) Need Help??


in reply to xluke_repwalker.pl

You XP whore you!

OK, I have just one comment on the use of XML::Twig (besides stating that this is how I use it myself most of the time): if you go through the pain of putting my ($t, $node) = @_; at the top of the anonymous sub you might as well use $node in the body:

NODE => sub { my ($t, $node) = @_; my $nodeid = $node->att ('id'); !exists ($nodehash {$nodeid}) or croak "N +ode $nodeid is duplicated!"; $nodehash {$nodeid} = {'nodeid' => $nodei +d, 'title' => $node- +>text, 'rep' => $node- +>att ('reputation'), 'last' => $node- +>att ('reputation'), 'date' => $node- +>att ('createtime') }; $t->purge; }

Also I found that -h does not work (-? does, you should check $args{h} on line 87, and I usually use $0 instead of hard-coding the name of the script in usage().

Good job anyway, it seems to be much faster than the previous version, 4 to 5 times faster actually!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-24 17:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found