develooper Front page | perl.beginners | Postings from February 2009

Re: objects regarding

Thread Previous
Gunnar Hjalmarsson
February 12, 2009 03:54
Re: objects regarding
Message ID:
Rob Dixon wrote:
> suresh kumar wrote:
>> This is my code :
>> $::dev2->getvalue($x,$y);


> The double colon in your variable names is probably superfluous unless your code
> is in a package other than 'main'. $::dev1 is equivalent to $main::dev1 and so
> just $dev1 if the current package is the default one.

Assuming that strictures is enabled - an assumption we should make on 
this list IMO - $dev1 is equivalent to $::dev1 only if $dev1 is declared 
using our (or use vars).

Gunnar Hjalmarsson

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About