in reply to Code optomization
our %info = (version => "0.3" format => 0, ... elite => 1, );
Larry Wall's rule for how to arrange things is put the important stuff first, and in this case the message can server as documentation as well as a debugging string, so should probably go first.print "This is a debug message\n" if ($debug);
return and "Failed to login\n" unless ($http_res->is_success);
foreach my $d (@data) { if ($d->[5] == 1) { ... } }
Of course, many of these are a matter of style; those are just my first impressions.
Overall, looks like a nicely written script. Thanks for posting it!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Code optomization
by sock (Monk) on Jul 08, 2004 at 20:46 UTC | |
by sgifford (Prior) on Jul 08, 2004 at 21:18 UTC | |
by Roy Johnson (Monsignor) on Jul 08, 2004 at 21:31 UTC | |
by sock (Monk) on Jul 08, 2004 at 21:30 UTC | |
by sgifford (Prior) on Jul 09, 2004 at 04:46 UTC | |
|
Re^2: Code optomization
by sock (Monk) on Jul 08, 2004 at 20:52 UTC |