File: 006_not_moose.t

package info (click to toggle)
libmoosex-params-validate-perl 0.21-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 324 kB
  • sloc: perl: 511; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 533 bytes parent folder | download | duplicates (3)
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();