Here's an output from MooseX::Method::Signatures when a validation fails:
Validation failed for
'MooseX::Types::Structured::Tuple[MooseX::Types::Structured::Tuple[Object,Defined],MooseX::Types::Structured::Dict[]]'
failed with value [ [ test=HASH(0xe641e8), undef ], { } ], Internal
Validation Error is: Validation failed for
'MooseX::Types::Structured::Tuple[Object,Defined]' failed with value [
test={ }, undef ] at
/home/user/perl5/lib/perl5/MooseX/Method/Signatures/Meta/Method.pm line 443
MooseX::Method::Signatures::Meta::Method::validate('MooseX::Method::Signatures::Meta::Method=HASH(0xe641b8)',
'ARRAY(0x16bd478)') called at
/home/user/perl5/lib/perl5/MooseX/Method/Signatures/Meta/Method.pm line 145
test::thing('test=HASH(0xe641e8)', 'undef') called at mxmstest.pl
line 21
Here's an example of what the output should look like:
Method signature validation failed for call to test::thing(): arg
'$a' must be type 'Defined', received value was 'undef' at mxmstest.pl
line 21
Note the important points here:
- no line numbers from within MooseX::Signatures
- a small amount of information describing something that needs fixing
(either the value or the declaration for a specific argument)
- information relating to the signature ($a) rather than the type
validator (tuples, etc.)