Subject: | "sub foo is method {}" gives compile-time error(s) |
This is using Perl6::Subs 0.05 on perl 5.8.7, on Ubuntu Linux 5.10 kernel 2.6.12.
Trying to declare a class method using the "sub foo is method { ... }" syntax gives the following error:
Illegal declaration of subroutine Nifty::say_nothing at spif.pl line 7.
Here is a package snipper which produces the result:
package Nifty; {
use Perl6::Subs;
use strict;
use warnings;
sub new { bless {}, shift; }
sub say_nothing is method { print "\n"; }
1;
}
Thank you for your time, and please let me know if I can be of any assistance.