Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: scope and declaration in local packages

by december (Pilgrim)
on Jan 31, 2011 at 13:14 UTC ( #885266=note: print w/replies, xml ) Need Help??


in reply to Re: scope and declaration in local packages
in thread scope and declaration in local packages

The initialisation of the variables happens at runtime (execution of the block), while the setting up of the subroutines happens at compile-time.

That explains my confusion as to why Perl doesn't complain about the functions but can't find the variables. Thanks!

The reason I'm not calling new is that I would like to encapsulate a regex (and relevant condition) inside the object which should work without actually creating an instance. I just want to store that regex in the object for cleanliness, apart from any actual OO code.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2022-01-24 04:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (64 votes). Check out past polls.

    Notices?