with 'MooseX::Getopt';
has 'data' => (
- metaclass => ['Getopt'],
+ metaclass => 'Getopt',
is => 'ro',
isa => 'Str',
default => 'file.dat',
You should rarely need to explicitly set the attribute metaclass. It is much
preferred to simply provide a trait (a role applied to the attribute
-metaclass), which allows other code to futher modify the attribute by applying
+metaclass), which allows other code to further modify the attribute by applying
additional roles.
Therefore, you should first try to do this: