around '_compute_getopt_attrs' => sub {
my $next = shift;
- my ( $class, @args ) = @_;
- grep {
- $_->isa("MooseX::Getopt::Meta::Attribute")
+ my ($class, @args) = @_;
+
+ return grep {
+ $_->does('MooseX::Getopt::Meta::Attribute::Trait')
} $class->$next(@args);
};