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

Re: Anonymous classes

Thread Previous | Thread Next
From:
Ingo Blechschmidt
Date:
May 29, 2005 06:52
Subject:
Re: Anonymous classes
Message ID:
d7ch7b$gmp$2@sea.gmane.org
Hi,

Simon Cozens wrote:
>     I'm having a seriously good time porting Maypole to Perl 6. If you
> still have reservations about how Perl 6 is going to be to program in,
> I urge you to try programming in it.
>     Now, commercial over, I have some questions.

:)

>     class Foo {
>       has Class $.request_class is rw;
>       method BUILD {
>          $.request_class = class is Foo::Request; # Or whatever

I think the only thing you're missing are two braces:
  $.request_class = class is Foo::Request {};


--Ingo

-- 
Linux, the choice of a GNU | self-reference, n. - See self-reference  
generation on a dual AMD   | 
Athlon!                    | 


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