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

Re: Recursive Runtime Role Reapplication Really Rebounds

Thread Previous | Thread Next
From:
Larry Wall
Date:
March 12, 2009 15:32
Subject:
Re: Recursive Runtime Role Reapplication Really Rebounds
Message ID:
20090312222750.GA27678@wall.org
On Thu, Mar 12, 2009 at 01:38:30PM -0700, Dave Whipp wrote:
> Larry Wall wrote:
>> Note however that coercions require parens these days, since types parse
>> as values, not as routine names.
>>
>>     $x = Role::Serializable::XML($resultset);
>>     $y = Role::Serializable::YAML($resultset);
>
> Should "indirect object" syntax work in this context?:
>
>    $a = Foo: $value;

That's not indirect object syntax.  It would have to be

    $a = Foo $value: ;

which should work as well as

    $a = $value.Foo;

> Also, given an appropriate infix:as operator:
>
>    $a = Foo Ras $value;

Possibly, but please don't. ;)

Larry

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