Subject: | $self->foo does not get parsed correctly |
justin@warpedreality:~/Parse-Method-Signatures$ prove -lwc t/fail.t
t/fail.t .. ')' expected whilst parsing signature near '->' in '$baz =
$self->baz' at
/home/justin/perl5/lib/perl5/MooseX/Method/Signatures/Meta/Method.pm
line 209
t/fail.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
Test Summary Report
-------------------
t/fail.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
Files=1, Tests=0, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.69 cusr
0.02 csys = 0.74 CPU)
Result: FAIL
Subject: | fail.t |
use Test::More;
use Test::Exception;
use MooseX::Declare;
class Foo {
has baz => (is => 'ro', default => 'baz');
method bar($baz = $self->baz) { }
}
my $foo = Foo->new;
lives_ok(sub { $foo->bar }, 'lives ok');
done_testing;