NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
premature optimisation? (Score:2)
Personally I'd put the initialisation of
%rev_typesoutside the subroutine (but inside anther block to limit the scope) to avoid initialising it each time through the subroutine. But this may well smack of premature optimisation. Then again, it makes it clear that it's a constant structure.Reply to This
Re:premature optimisation? (Score:2)
No, you're right. I should "use constant ..." to make it clear what's going on. Whenever I do a quick refactoring in place, I try to limit the changes. Sometimes that means I wind up not changing enough.
Re:premature optimisation? (Score:1)
But beware. Sometimes that practise bites me when I eventually implement a class, not in it's own
And there is much confusion.
Re:premature optimisation? (Score:1)