Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Qualified package variable access

by jerryhone (Sexton)
on Dec 17, 2020 at 18:38 UTC ( [id://11125357]=note: print w/replies, xml ) Need Help??


in reply to Qualified package variable access

Thanks Brother Rolf. 'our' is the fix. I've been using Perl on and off for 20 odd years and that's the first time I've used 'our' as far as I recall. My very well thumbed O'Reilly camel book (2nd edition 1996!) doesn't actually mention it!

Replies are listed 'Best First'.
Re^2: Qualified package variable access
by haukex (Archbishop) on Dec 17, 2020 at 18:47 UTC
    that's the first time I've used 'our' as far as I recall. My very well thumbed O'Reilly camel book (2nd edition 1996!) doesn't actually mention it!

    our was added in Perl 5.6, released in March 2000. Before that, one of the ways "predeclare" package variables was the vars pragma. You might be interested in the 4th edition Camel, or Modern Perl.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2024-04-23 08:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found