Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the nextgen CPAN distribution.

Report information
The Basics
Id: 61994
Status: resolved
Priority: 0/
Queue: nextgen

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.05
Fixed in: (no value)



Subject: t/10_blacklist_require_chain.t is not testing what it thinks its testing
t/10_blacklist_require_chain.t appears to be trying to test the code in nextgen::blacklist that avoids blowing over an existing CORE::GLOBAL::require. It isn't. nextgen::blacklist loads first via the BEGIN block, then CORE::GLOBAL::require is set. The test doesn't check that nextgen::blacklist's require override is called, so the test only tests half the problem. In order for it to work, CORE::GLOBAL::require would have to be set in a BEGIN block before nextgen is loaded and actually work as a require(). Probably just setting a global variable indicating it was called. Unfortunately I can't seem to write a CORE::GLOBAL::require that works. I think its causing "use 5.10.1" to not really activate. Also, rather than keeping the existing require override in a global, put it in a lexical wrapper like so: my $require = \&CORE::GLOBAL::require; *CORE::GLOBAL::require = sub { $require->(@_); my_require(@_); }; This will allow them to chain indefinitely.
Cool tell me what you think about the version on git now. -- Evan Carroll System Lord of the Internets http://www.evancarroll.com