Subject: | Cannot apply parameterized roles with Role(parameters) syntax |
Date: | Fri, 30 Apr 2010 23:39:55 +0200 |
To: | bug-MooseX-Declare [...] rt.cpan.org |
From: | Tarcisio Fedrizzi <tarcisio.fedrizzi [...] gmail.com> |
Hi,
I think there is a bug when trying to apply a parameterized role
to a class with the "with Role(name1 => value1,...)" syntax. When I try
to run
the follwing code:
----------------------------------------------------
package IAmARole;
use MooseX::Declare;
use MooseX::Types::Moose qw(Str);
role IAmARole(Str :$i_am_a_string)
{
}
package IAmAClass;
use MooseX::Declare;
class IAmAClass with IAmARole(i_am_a_string => "asd")
{
}
package main;
---------------------------------------
I get this error: "expected option name at
/usr/share/perl5/MooseX/Declare/Syntax/NamespaceHandling.pm line 47"
The version of my perl distribution is 5.10.1.
The version of MooseX::Declare is 0.33
Here you have my uname -a string "Linux localhost 2.6.31 #1 SMP Sun Dec
27 11:21:43 CET 2009 x86_64 GNU/Linux",
the os is a debian.
Bye,
Tarcisio Fedrizzi