1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
## no critic (Moose::RequireCleanNamespace, Modules::ProhibitMultiplePackages, Moose::RequireMakeImmutable)
use strict;
use warnings;
use Test::More;
## no critic (BuiltinFunctions::ProhibitStringyEval, ErrorHandling::RequireCheckingReturnValueOfEval)
eval <<'EOF';
{
package Foo;
use MooseX::Params::Validate;
}
EOF
is(
$@,
q{},
'loading MX::Params::Validate in a non-Moose class does not blow up'
);
ok(
Foo->can('validated_hash'),
'validated_hash() sub was added to Foo package'
);
done_testing();
|