Subject: | Tests may fail if Example.pm from CPAN is installed |
It seems that there's an indexed Example.pm at CPAN:
cpan[1]> m Example
CPAN: Storable loaded ok (v2.20)
Going to read '/home/cpansand/.cpan/Metadata'
Database was generated on Mon, 23 Apr 2018 17:41:03 GMT
Module id = Example
CPAN_USERID MSCHLUE (Michael Schluter <mschlue@cpan.org>)
CPAN_VERSION undef
CPAN_FILE M/MS/MSCHLUE/Class-Classgen-classgen-3.03.tar.gz
INST_FILE (not installed)
If this module is installed (and probably if other conditions are met) then the test suite fails:
# Failed test 'use Example;'
# at t/methods.t line 5.
# Tried to use 'Example'.
# Error: syntax error at t/lib/Example.pm line 10, near ") {"
# Compilation failed in require at t/methods.t line 5.
# BEGIN failed--compilation aborted at t/methods.t line 5.
Can't locate object method "foo" via package "Example" at t/methods.t line 10.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 255 just after 2.
t/methods.t ..
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/2 subtests