Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Testing $^W

by Anonymous Monk
on Nov 04, 2005 at 18:39 UTC ( #505838=note: print w/ replies, xml ) Need Help??


in reply to Re: Testing $^W
in thread Testing $^W

But then, why stop at testing $^W? How about $*? $"? @ARGV?, %SIG? $package::var?

I think you meant this in jest, but this would be a very valuable resource if it could be automated; kind of like the sort of utility that tests for memory leaks in C.

Just being able to know that a given module has tampered with your { global variables/function definitions/namespaces/whatever} is very, very handy.

Perl gives you a lot of rope to hang yourself (and others!) with; having tools to keep it coiled neatly would really be nice sometimes. :-)
--
Ytrew


Comment on Re^2: Testing $^W
Replies are listed 'Best First'.
Re^3: Testing $^W
by jthalhammer (Friar) on Nov 06, 2005 at 23:14 UTC
    That's a great idea! I think you could add a Policy to Perl::Critic that warns you if a global or package variable was modified without being localized first.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (15)
As of 2015-07-31 14:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (278 votes), past polls