Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: xluke_repwalker.pl

by mirod (Canon)
on Mar 19, 2001 at 20:26 UTC ( #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!


Comment on Re: xluke_repwalker.pl
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2014-12-29 03:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls