Skip Menu |

This queue is for tickets about the Perl6-Subs CPAN distribution.

Report information
The Basics
Id: 16969
Status: open
Priority: 0/
Queue: Perl6-Subs

People
Owner: Nobody in particular
Requestors: hcarty [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.05
Fixed in: (no value)



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.
I am also getting this error with perl 5.8.8 on Debian Etch. Using the following alternate syntax seems to work for me: method foo { } On Sun Jan 08 17:33:48 2006, guest wrote: Show quoted text
> 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.