This seems to work:
use MooseX::Declare;
class Example {
method my_method() {
}
}
This seems to not create the method:
use MooseX::Declare;
class Example {
method my_method()
{
}
}
Am I missing something, or is it a restriction of MooseX::Declare
that the opening curly brace has to go on the same line as 'method'?
--edit--
MooseX::Declare
= 0.35
Devel::Declare
= 0.006004 - looks like I am down version in Devel::Declare
, later versions don't seem to be available within ActiveState perl due to some build issue: http://code.activestate.com/ppm/Devel-Declare/ (up to and including 0.006008)
Yes, that should work. You might have to upgrade Devel::Declare, which does the syntax magic, or MooseX::Declare.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With