From: Jesse Luehrs Date: Fri, 4 Jun 2010 19:31:03 +0000 (-0500) Subject: make ::Strict work with the trait stuff X-Git-Tag: 0.28~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eb404494ca0bfd48975259f95272af6d3e689d06;p=gitmo%2FMooseX-Getopt.git make ::Strict work with the trait stuff --- diff --git a/lib/MooseX/Getopt/Strict.pm b/lib/MooseX/Getopt/Strict.pm index f845d69..9b3efac 100644 --- a/lib/MooseX/Getopt/Strict.pm +++ b/lib/MooseX/Getopt/Strict.pm @@ -7,8 +7,8 @@ with 'MooseX::Getopt'; around '_compute_getopt_attrs' => sub { my $next = shift; my ( $class, @args ) = @_; - grep { - $_->isa("MooseX::Getopt::Meta::Attribute") + grep { + $_->does("MooseX::Getopt::Meta::Attribute::Trait") } $class->$next(@args); }; diff --git a/t/005_strict.t b/t/005_strict.t index 206cb64..dd4c6c3 100644 --- a/t/005_strict.t +++ b/t/005_strict.t @@ -34,7 +34,7 @@ BEGIN { ); has 'horse' => ( - metaclass => 'Getopt', + traits => ['Getopt'], is => 'ro', isa => 'Str', default => 'bray',