Skip Menu |

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

Report information
The Basics
Id: 67262
Status: resolved
Priority: 0/
Queue: Module-Refresh

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

Bug Information
Severity: (no value)
Broken in: 0.13
Fixed in: (no value)



Subject: subroutines not being unloaded
Module::Refresh doesn't appear to be removing subroutines from modules when it unloads them. I've attached a test that fails for me on perl 5.10.1.
Subject: test.pl
#!/usr/bin/env perl use strict; use warnings; use Test::More; use Module::Refresh; use File::Temp; use Path::Class; my $dir = File::Temp->newdir; push @INC, $dir->dirname; dir($dir)->file('Foo.pm')->openw->print(<<'PM'); package Foo; sub bar { } 1; PM require Foo; Module::Refresh->refresh; can_ok('Foo', 'bar'); ok(!Foo->can('baz'), "!Foo->can('baz')"); sleep 2; dir($dir)->file('Foo.pm')->openw->print(<<'PM'); package Foo; sub baz { } 1; PM Module::Refresh->refresh; can_ok('Foo', 'baz'); ok(!Foo->can('bar'), "!Foo->can('bar')"); done_testing; __END__ ok 1 - Foo->can('bar') ok 2 - !Foo->can('baz') ok 3 - Foo->can('baz') not ok 4 - !Foo->can('bar') # Failed test '!Foo->can('bar')' # at test.pl line 38. 1..4 # Looks like you failed 1 test of 4.
Subject: Re: [rt.cpan.org #67262] subroutines not being unloaded
Date: Tue, 12 Apr 2011 18:10:26 +1000
To: Jesse Luehrs via RT <bug-Module-Refresh [...] rt.cpan.org>
From: Jesse Vincent <jesse [...] fsck.com>
...that was never supposed to actually work. However, I've committed your tests, added the functionality and released 0.14. Thanks! On Tue 5.Apr'11 at 20:54:21 -0400, Jesse Luehrs via RT wrote: Show quoted text
> Tue Apr 05 20:54:20 2011: Request 67262 was acted upon. > Transaction: Ticket created by DOY > Queue: Module-Refresh > Subject: subroutines not being unloaded > Broken in: 0.13 > Severity: (no value) > Owner: Nobody > Requestors: DOY@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=67262 > > > > Module::Refresh doesn't appear to be removing subroutines from modules > when it unloads them. I've attached a test that fails for me on perl 5.10.1.