On Fri, Aug 09, 2002 at 03:09:29PM -0400, Chris Dutton wrote:
> 
> This one actually came to me just the other night.  Would it be possible 
> in Perl 6 to create "anonymous classes"?  Something like:
> 
> my $foo_class = class {
>       method new {
>               # yada yada yada
>       }
> }
> 
> my $foo_obj = $foo_class.new;

Yup. Reread the section of Exegesis 4 on "Lexical Exceptions". You even
got the exact syntax (always a nice confirmation of how natural it is :).

Allison

Reply via email to