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 10:29
Subject:
Re: Recursive Runtime Role Reapplication Really Rebounds
Message ID:
20090312172853.GA20672@wall.org
On Thu, Mar 12, 2009 at 08:51:45AM -0700, Ovid wrote:
: 
: ----- Original Message ----
: 
: > From: David Green <david.green@telus.net>
: 
: > I suppose, but is there a reason why you want to apply roles instead of coercing 
: > the results?
: > 
: >     $x = Role::Serializable::XML $resultset;
: >     $y = Role::Serializable::YAML $resultset;
: 
: 
: Because I am coming from Moose instead of Perl 6 and didn't know about this :) 

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);

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