Subject: | "Must have an is" error when creating class with delegated attributes |
Hi,
The test in the attached file fails with the following error:
Must have an is at /home/nelo/perl5/perlbrew/perls/perl-5.14.4/lib/site_perl/5.14.4/Method/Generate/Accessor.pm line 37.
BEGIN failed--compilation aborted at moops-class-attribute-handler.t line 13.
I am mostly just curious if the way I am trying to create my class is wrong. It's the sort of thing I do quite often so I am of the opinion it should work.
Sincerely
Subject: | moops-class-attribute-handler.t |
use Moops;
use Test::Exception;
use Test::More;
lives_ok {
class Foo
# :ro
{
has bar => (
handles => ['get'],
traits => ['Hash'],
);
}
} 'can declare a class without attributes';
done_testing;