use strict;
use warnings;
-use Test::More tests => 17;
+use Test::More;
use Test::Exception;
-
=pod
is => rw, writer => _foo # turns into (reader => foo, writer => _foo)
=cut
sub make_class {
- my ($is, $attr, $class) = @_;
+ my ($is, $attr, $class) = @_;
- eval "package $class; use Moose; has 'foo' => ( is => '$is', $attr => '_foo' );";
+ eval "package $class; use Moose; has 'foo' => ( is => '$is', $attr => '_foo' );";
- return $@ ? die $@ : $class;
+ return $@ ? die $@ : $class;
}
my $obj;
dies_ok { make_class('ro', 'accessor', "Test::Class::AccessorRO"); } "Cant define attr with ro + accessor";
+done_testing;