Revision 28196

Date:
2009/09/07 06:48:34
Author:
moritz
Revision Log:
[S12] spec behaviour of stubbed classes

This is a bit more general than what I had in mind first. If the implementors
say this is too hard to do it this way, we can degrade it to allow only a single
'...' term in the body of a stubbed class.
Files:

Legend:

 
Added
 
Removed
 
Modified
  • docs/Perl6/Spec/S12-objects.pod

     
    55 55 class is also a module, it also handles any module-oriented keywords.
    56 56 You can export subs from a class at "use" time, for instance.)
    57 57
    58 If the class body throws an exception from a literal C<...> (yada) term,
    59 the class defintion is considered incomplete, and a second definition of
    60 that class does not complain, so you can write
    61
    62 class Foo {
    63 has $!some_attr;
    64
    65 ... # literal ... here interrrupts class definition
    66 }
    67
    68 # other code here
    69
    70 class Foo {
    71 # rest of class defintion here
    72 }
    73
    58 74 A named class declaration can occur as part of an expression, just like
    59 75 named subroutine declarations.
    60 76