LibreCat / Catmandu-SRU

Catmandu module for working with SRU data.
https://metacpan.org/release/Catmandu-SRU
5 stars 5 forks source link

prove vs perl of t-files #9

Closed jorol closed 10 years ago

jorol commented 10 years ago

Execution of test files with perl throws an error:

$ perl -Ilib ./t/importer.t
coercion for "parser" failed: coercion for "parser" failed: Indirect call of met
hod "new" on object "Catmandu::Importer::SRU::Parser::simple" at (eval 238) line 1.
at (eval 237) line 113.

Execution of test files with prove works fine:

$ prove -Ilib ./t
t\00-load.t .... ok
t\importer.t ... ok
t\namespace.t .. ok
t\simple.t ..... ok
t\struct.t ..... ok
All tests successful.
Files=5, Tests=45, 11 wallclock secs ( 0.08 usr +  0.06 sys =  0.14 CPU)
Result: PASS
phochste commented 10 years ago

I've seen this before and I think this has to do with a older version of Moo. Submitted 0.035 with your fixes and updated depedencies to CPAN

jorol commented 10 years ago

Upgraded Moo to v1.005000 and still get same error message.

phochste commented 10 years ago

Using Catmandu::Util::require_package in SRU.pm seems to fix that