develooper Front page | perl.perl6.language | Postings from June 2005

Re: AUTLOAD and $_

Thread Previous | Thread Next
From:
Maxim Sloyko
Date:
June 22, 2005 03:42
Subject:
Re: AUTLOAD and $_
Message ID:
20050622102721.8279.qmail@lists.develooper.com
Juerd wrote:

>> sub AUTOLOAD ($whatever) {  # but no *[at]_
>>      my $s = get_subref_for $whatever;
>>      our &::($whatever) := $s;
>>      return sub () { 1 };
> 
> Then the subref will not be executed, and the bug will very quickly be
> discovered. I don't see any problem with this.
> 

Can we do "return undef" in this case?  I mean. can undef mean a no-op 
in subref context?

--
Maxim Sloyko

Thread Previous | Thread Next


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