Subject: | Tests fail if CATALYST_CONFIG_LOCAL_SUFFIX/MYAPP_CONFIG_LOCAL_SUFFIX set in environment. |
Date: | Fri, 1 May 2009 08:26:38 -0700 (PDT) |
To: | bug-Config-JFDI [...] rt.cpan.org |
From: | Louis Erickson <lerickson [...] rdwarf.net> |
First, thank you for writing and sharing this module. It does a better
job than the thing I'd faked up to do the same thing and allows the
support tools I need to work like Catalyst. It's a handy module, and I'm
glad I heard about it.
I did find a possible problem with the tests for Config::JFDI.
I got the following errors from make test:
# Failed test at t/14-loader-env-lookup.t line 27.
# got: undef
# expected: 'key'
# Failed test at t/14-loader-env-lookup.t line 29.
# got: undef
# expected: 'new key'
# Failed test at t/14-loader-env-lookup.t line 30.
# got: 'View::TT'
# expected: 'View::TT::New'
# Looks like you failed 3 tests of 13.
t/14-loader-env-lookup.t .. Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/13 subtests
I realized I had CATALYST_CONFIG_LOCAL_SUFFIX and
MYAPP_CONFIG_LOCAL_SUFFIX set from some testing I'd been doing earlier.
Apparently those being set confused the test - I'll guess that an extra
file was read, which confused the test.
After unsetting those variables, the tests ran cleanly.
I guess the test scripts should take those out of %ENV on the scripts you
don't expect them to be used, to prevent strange problems like this.
A force install (or just to skip the tests) would have worked fine, as it
was just a quirk of my environment causing tests to behave oddly.
There was also a whole bunch of warnings from Class::MOP, like this:
t/22-default.t ............ The compute_all_applicable_attributes method
has been deprecated. Use get_all_attributes instead.
at
/usr/lib/perl5/site_perl/5.8.8/i586-linux-thread-multi/Class/MOP/Class.pm
line 946
Class::MOP::Class::compute_all_applicable_attributes() called at
/usr/lib/perl5/site_perl/5.8.8/Data/Visitor/Callback.pm line 40
Data::Visitor::Callback::BUILDARGS() called at generated method
(unknown origin) line 4
Data::Visitor::Callback::new() called at
/root/.cpan/build/Config-JFDI-0.05-GohKcW/blib/lib/Config/JFDI.pm line 282
Config::JFDI::load() called at
/root/.cpan/build/Config-JFDI-0.05-GohKcW/blib/lib/Config/JFDI.pm line 237
Config::JFDI::config() called at
/root/.cpan/build/Config-JFDI-0.05-GohKcW/blib/lib/Config/JFDI.pm line 228
Config::JFDI::get() called at t/22-default.t line 19
They're just warnings and I'm happy to ignore them, but they're sure
noisy. I guess my Class::MOP is too new. =) It is current, version
0.83.
Thanks again for sharing this module!
--
Louis Erickson - lerickson@rdwarf.net - http://www.rdwarf.com/~wwonko/
Accuracy, n.:
The vice of being right