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

is rw basically a null-op on objects/references?

Thread Next
From:
Ingo Blechschmidt
Date:
April 28, 2005 05:32
Subject:
is rw basically a null-op on objects/references?
Message ID:
d4qkms$1ma$1@sea.gmane.org
Hi,

does the following work as expected?

  for %hash.pairs -> $pair { # Note: No "is rw"!
    $pair.value = ...;       # Modifies %hash
  }

Or is it necessary to declare $pair as is rw? (The snippet does not
modify $pair, but $pair.value.)


--Ingo

-- 
Linux, the choice of a GNU | The next statement is not true.
generation on a dual AMD   | The previous statement is true.  
Athlon!                    | 


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