Skip Menu |

This queue is for tickets about the Module-Runtime CPAN distribution.

Report information
The Basics
Id: 75001
Status: resolved
Priority: 0/
Queue: Module-Runtime

People
Owner: Nobody in particular
Requestors: w.phillip.moore [...] gmail.com
Cc:
AdminCc:

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



Subject: Module-Runtime-0.012 t/dependency.t assumptions
The latest release of Module-Runtime includes a test that makes an assumption that is not true in the environment I support, which uses a sitecustomize.pl to automate several things, and while that script is extremely minimal, it does: use strict; use warnings; which means that ALL perl processes end up loading those modules. t/dependency.t assumes that %INC will be empty before use Module::Runtime qw(require_module); is called, and in my case, this isn't true. The attached patch allows this test to succeed by eliminating the assumption of an empty %INC, and changes it to explicitly check what was added to %INC by that call. I appreciate that my use case is an edge condition, but if you would accept this patch, it will be one less that I have to maintain for our system, and it simply eliminates the assumption, and make the test more explicit. Your call. Thanks in advance, if you do...
Subject: 01_t_dependency.patch
diff -rc ../Module-Runtime-0.012-orig/t/dependency.t ./t/dependency.t *** ../Module-Runtime-0.012-orig/t/dependency.t Sun Feb 12 05:54:02 2012 --- ./t/dependency.t Tue Feb 14 08:47:22 2012 *************** *** 2,8 **** --- 2,10 ---- # script cannot itself use warnings, Test::More, or any other module. BEGIN { print "1..1\n"; } + BEGIN { %INC_pre = %INC } use Module::Runtime qw(require_module); + BEGIN { map { delete $INC{$_} } keys %INC_pre } print join(" ", sort keys %INC) eq "Module/Runtime.pm" ? "" : "not ", "ok 1\n"; 1;
Subject: Re: [rt.cpan.org #75001] Module-Runtime-0.012 t/dependency.t assumptions
Date: Tue, 14 Feb 2012 15:11:42 +0000
To: Phillip Moore via RT <bug-Module-Runtime [...] rt.cpan.org>
From: Zefram <zefram [...] fysh.org>
Thanks. I've already had that problem reported by someone else, and it's fixed in my repo. New release soon. -zefram
Subject: Re: [rt.cpan.org #75001] Module-Runtime-0.012 t/dependency.t assumptions
Date: Tue, 14 Feb 2012 10:13:28 -0500
To: bug-Module-Runtime [...] rt.cpan.org
From: Phillip Moore <w.phillip.moore [...] gmail.com>
Awesome -- thanks!!! On Tue, Feb 14, 2012 at 10:12 AM, Zefram via RT <bug-Module-Runtime@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=75001 > > > Thanks.  I've already had that problem reported by someone else, and > it's fixed in my repo.  New release soon. > > -zefram >
I came to report this same issue, which caused a test failure on my system, too; great to see that it's both reported already and a fix is forthcoming :)
Fixed in Module-Runtime-0.013.