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

Re: objects regarding

Thread Previous
From:
Gunnar Hjalmarsson
Date:
February 12, 2009 03:54
Subject:
Re: objects regarding
Message ID:
20090212115410.24792.qmail@lists.develooper.com
Rob Dixon wrote:
> suresh kumar wrote:
>> This is my code :
>>
>> $::dev2->getvalue($x,$y);

<snip>

> 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
Email: http://www.gunnar.cc/cgi-bin/contact.pl

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About