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

Re: -X's auto-(un)quoting?

Thread Previous | Thread Next
From:
Juerd
Date:
April 25, 2005 12:11
Subject:
Re: -X's auto-(un)quoting?
Message ID:
20050425191143.GP26732@c4.convolution.nl
Paul Seamons skribis 2005-04-25 13:02 (-0600):
> method foo ($self:) {
>    return grep { $self.is_ok( .value ) } $self.info_pairs;
>    # .value called on the topic $_
> }

I think that to be fair, you have to leave out the redundant $self
there.

    return grep { $self.is_ok( .value ) } .info_pairs;

> Proposed syntax in this thread (among various others)
> method foo {
>   return grep { $^.is_ok( .value ) } $^.info_pairs;
>   # .value called on the topic
> }

I think that also wanted:

    method foo {
        return grep { ^is_ok( .value ) } ^info_pairs;
        # .value called on the topic
    }

> That is the goal - to find some nice variable that looks vaguely usable and 
> that people won't rebel against using.

Variable or alternative for the dot.


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html

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