Skip Menu |

This queue is for tickets about the Config-JFDI CPAN distribution.

Report information
The Basics
Id: 49012
Status: open
Priority: 0/
Queue: Config-JFDI

People
Owner: Nobody in particular
Requestors: bo [...] startsiden.no
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.063
Fixed in: (no value)



Subject: Some tests not working
Hi, We have a chroot environment for building packages of modules, and in this environment the tests for Config-JFDI breaks. After some digging around I found the problem, but I'm a bit uncertain of why it works normally. in t/15-install-accessor.t you do like this: Line 9: my $config = Config::JFDI->new(qw{ name Xyzzy::Catalyst path t/assets install_accessor A::Random::Package }); Line 19: $config = Config::JFDI->new(qw{ name Xyzzy::Catalyst path t/assets install_accessor 1 }); For what I can figure out this will both load t/assets/xyzzy_catalyst.pl in Config::Any::Perl::load: return eval { require $file }; In our building environment this returns 1 the second time it is run. And in the documentation of require (perldoc): Note that the file will not be included twice under the same specified name.
On Wed Aug 26 00:28:48 2009, BOLAV wrote: Show quoted text
> For what I can figure out this will both load t/assets/xyzzy_catalyst.pl > > in Config::Any::Perl::load: > return eval { require $file }; > > In our building environment this returns 1 the second time it is run. > > And in the documentation of require (perldoc): > Note that the file will not be included twice under the same > specified name. >
This seems to be more of an issue with Config::Any than my tests. What version of Config::Any are you using? In my version (0.17), Config::Any::Perl::load looks like this: sub load { my $class = shift; my $file = shift; my $content; unless ( $content = $cache{ $file } ) { $content = require $file; $cache{ $file } = $content; } return $content; } Which should avoid your problem, as the file is only required once.