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

Referencing a caller's slurpy array.

Thread Next
From:
Rod Adams
Date:
March 14, 2005 23:54
Subject:
Referencing a caller's slurpy array.
Message ID:
423694A1.5010005@rodadams.net
A06 says:

If you |shift| or |pop| without an argument, it shifts or pops whatever 
slurpy array is in scope.


Shall we assume that @_ is always an alias for this array, so I can say 
something like:

  multi sub pop (Array ?@array = @caller::_) returns Scalar

?

btw, is ?@ legal in a signature? It's not specifically mentioned in 
A/S04, but it makes sense it would be allowed along with ?%.

-- Rod Adams

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