develooper Front page | perl.perl6.language | Postings from August 2001

Re: properties, revisited

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
August 2, 2001 17:51
Subject:
Re: properties, revisited
Message ID:
5.1.0.14.0.20010802204535.02424f28@24.8.96.48
At 06:57 PM 8/2/2001 -0400, Bryan C. Warnock wrote:
>Here's how I'm documenting it.  Corrections requested.
>
>Properties are by Perl thingy.  (scalar, array, hash, reference, blessed
>reference?, file handle, etc)

I think they're supposed to be both by perl thingie and by value. So:

   my $foo is const = 0 is true;

$foo has the property const, while the value 0 in $foo has the property 
true. If you do:

    $bar = $foo;

the trueness of 0 is copied (since the value is copied, along with 
properties on the value) while the constness of $foo is *not* copied, as 
it's a variable property and those stick with the variables.

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


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