Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Use of 'our' considered harmful

by itub (Priest)
on Sep 24, 2004 at 12:50 UTC ( #393487=note: print w/ replies, xml ) Need Help??


in reply to Re: Use of 'our' considered harmful
in thread Use of 'our' considered harmful

Of course, it only matters if you use strict. I'm not saying you shouldn't use it, but what's stopping you from using it after the variables that really need to be public?

package Acme::Example; use base 'Exporter'; $VERSION = '1.00'; @EXPORT_OK = qw(example); use strict; sub example { ... }


Comment on Re^2: Use of 'our' considered harmful
Select or Download Code
Re^3: Use of 'our' considered harmful
by gaal (Parson) on Sep 24, 2004 at 15:24 UTC
    Nothing's stoping you. But do you also access those variables before you use strict? :)

    (That is, every mention of a package variable under use strict -- whether a declaration or use -- needs to be fully qualified, or in the scope of an our or a use vars. (Well, mentioning scope when talking about use vars is misleading, since its effect is declarative and not lexical.))

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (13)
As of 2013-05-24 20:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (515 votes), past polls