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

Why $.?

Thread Next
From:
Luke Palmer
Date:
May 16, 2005 03:02
Subject:
Why $.?
Message ID:
7ca3f0160505160302246e12d@mail.gmail.com
I am currently failing to see the need for a distinction between $.
and $: .  The only difference is in whether accessors are *generated*;
the attribute access itself is no different.  If you want to refactor
and turn your auto-accessor into a custom one, you have to[1] go
replace $. with $: everywhere it is mentioned.

Luke

[1] Well, you don't have to, but you probably would have written it
with a $: if you knew about the accessor all along.  Stylistically, I
don't think it's a good distinction to have, because when there are
explicit accessors present, there is no distinction.

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