Skip Menu |

This queue is for tickets about the Devel-Unplug CPAN distribution.

Report information
The Basics
Id: 72697
Status: new
Priority: 0/
Queue: Devel-Unplug

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

Bug Information
Severity: Important
Broken in: 0.03
Fixed in: (no value)



Subject: Loading as a debugger (-d:Unplug=...) does not work
mendel@vger:~$ perl -d:Unplug=Some::Module -e 1 No DB::DB routine defined at -e line 1. According to the documentation (<http://perldoc.perl.org/perldiag.html#No-DB%3a%3aDB-routine-defined> and <http://perldoc.perl.org/perldebguts.html#Debugger-Internals>) an empty DB::DB sub should be defined in Devel/Unplug.pm. Devel::Unplug: 0.03 Devel::TraceLoad::Hook: 1.04 Perl: v5.10.1 i486-linux-gnu-thread-multi (Debian Squeeze, 5.10.1-17squeeze2)
Subject: Devel-Unplug-0.03-debugger_invocation_fix.diff
diff -Naur a/Devel-Unplug-0.03/Changes b/Devel-Unplug-0.03/Changes --- a/Devel-Unplug-0.03/Changes 2007-11-14 18:08:55.000000000 +0100 +++ b/Devel-Unplug-0.03/Changes 2011-11-24 15:31:38.000000000 +0100 @@ -7,3 +7,8 @@ - Added OO interface - Allow regex module names - Work even if import isn't called + +0.03 2007-11-14 + +0.04 2011-11-24 + - Made '-d:Unplug=...' invocation work diff -Naur a/Devel-Unplug-0.03/lib/Devel/Unplug/OO.pm b/Devel-Unplug-0.03/lib/Devel/Unplug/OO.pm --- a/Devel-Unplug-0.03/lib/Devel/Unplug/OO.pm 2007-11-14 18:08:55.000000000 +0100 +++ b/Devel-Unplug-0.03/lib/Devel/Unplug/OO.pm 2011-11-24 15:32:26.000000000 +0100 @@ -10,13 +10,13 @@ =head1 VERSION -This document describes Devel::Unplug::OO version 0.03 +This document describes Devel::Unplug::OO version 0.04 =cut use vars qw($VERSION @ISA); -$VERSION = '0.03'; +$VERSION = '0.04'; =head1 SYNOPSIS diff -Naur a/Devel-Unplug-0.03/lib/Devel/Unplug.pm b/Devel-Unplug-0.03/lib/Devel/Unplug.pm --- a/Devel-Unplug-0.03/lib/Devel/Unplug.pm 2007-11-14 18:08:55.000000000 +0100 +++ b/Devel-Unplug-0.03/lib/Devel/Unplug.pm 2011-11-24 15:32:19.000000000 +0100 @@ -9,13 +9,13 @@ =head1 VERSION -This document describes Devel::Unplug version 0.03 +This document describes Devel::Unplug version 0.04 =cut use vars qw($VERSION @ISA); -$VERSION = '0.03'; +$VERSION = '0.04'; =head1 SYNOPSIS @@ -115,6 +115,10 @@ ); } +if ($^P) { + eval "sub DB::DB {}"; +} + =head2 C<< unplugged >> Get the list of unplugged modules. The returned array may potentially diff -Naur a/Devel-Unplug-0.03/META.yml b/Devel-Unplug-0.03/META.yml --- a/Devel-Unplug-0.03/META.yml 2007-11-14 18:27:50.000000000 +0100 +++ b/Devel-Unplug-0.03/META.yml 2011-11-24 15:32:37.000000000 +0100 @@ -1,6 +1,6 @@ --- #YAML:1.0 name: Devel-Unplug -version: 0.03 +version: 0.04 abstract: Simulate the non-availability of modules license: perl generated_by: ExtUtils::MakeMaker version 6.36 diff -Naur a/Devel-Unplug-0.03/t/commandline.t b/Devel-Unplug-0.03/t/commandline.t --- a/Devel-Unplug-0.03/t/commandline.t 2007-11-14 18:26:24.000000000 +0100 +++ b/Devel-Unplug-0.03/t/commandline.t 2011-11-24 15:29:39.000000000 +0100 @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More tests => 5; use File::Spec; use IPC::Run qw( run timeout ); @@ -12,9 +12,15 @@ like tryit( @cmd, '-Ilib', '-MDevel::Unplug=Some::Module', '-MSome::Module', @nop ), qr{Can't\s+locate\s+Some/Module.pm}, "error message"; +like tryit( @cmd, '-Ilib', '-d:Unplug=Some::Module', '-MSome::Module', @nop ), + qr{Can't\s+locate\s+Some/Module.pm}, "error message (-d:Unplug=...)"; + like tryit( @cmd, '-Ilib', '-MDevel::Unplug=Some::Module', '-MSome::Other::Module', @nop ), qr{^\s*$}, "no crosstalk"; +like tryit( @cmd, '-Ilib', '-d:Unplug=Some::Module', '-MSome::Other::Module', @nop ), + qr{^\s*$}, "no crosstalk (-d:Unplug=...)"; + sub tryit { my @cmd = @_; run \@cmd, \my $in, \my $out, \my $err, timeout( 10 );
Anything against the patch? It's a pity that it cannot be used the way its documentation advertises..