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

Re: Perl archeology: Need help in refactoring of old Perl code that does not use strict

by AnomalousMonk (Bishop)
on Nov 14, 2017 at 18:11 UTC ( #1203416=note: print w/replies, xml ) Need Help??


in reply to Perl archeology: Need help in refactoring of old Perl code that does not use strict

Further to Corion's wise general advice, I would add to

... find and collect the global variables ... and then [remove them and] pass the parameters explicitly instead of implicitly ...
that if you can also identify a global variable as, in fact, not varying during program execution, you can convert this variable into a true constant and thus remove a potential headache: a global constant is, in general, a Good Thing (or at least no Bad Thing).


Give a man a fish:  <%-{-{-{-<

  • Comment on Re: Perl archeology: Need help in refactoring of old Perl code that does not use strict
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2019-12-15 00:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?