On Tue, 20 Apr 2004, Juerd wrote: > Brent 'Dax' Royal-Gordon skribis 2004-04-20 12:58 (-0700): > > method buffersize() > > will store { > > my $sqrt=$^v.sqrt; > > die "$^v is not a power of two" unless int($sqrt) == $sqrt; > > $.buffer = "\x[0]" x $^v; > > } > > { +$.buffer.bytes } > > Could this be written as: > > method buffersize { > +$.buffer.bytes > } will store { > my $sqrt = $^v.sqrt; > ... > } > > Or does "will store BLOCK" really have to go before the main block?
The syntax <rule>s in Apocalypse 6 require the main block to be at the end. http://dev.perl.org/perl6/apocalypse/A06.html#The_sub_form