'our' is a good thing
By: Keith Watanabe
Published On: 9-20-2005
the 'our' scope indicator in perl helps eliminate namespace issues easily so that you don't have to fully qualify global variables in packages. for instance: package myPackage; use yourPackage; use strict; our @ISA = qw(yourPackage); in the past, you'd be forced to fully qualify the @ISA variable. here, you're able to reduce the amount of text as 'our' appends the variable name to the namespace the item is being declared. also, it helps eliminate annoying warnings related to variables only declared once.
Post Comment
Trackbacks: (Trackback URL)
No Comments Posted Yet
