Skip Menu |

This queue is for tickets about the Debug-ShowStuff CPAN distribution.

Report information
The Basics
Id: 64902
Status: resolved
Priority: 0/
Queue: Debug-ShowStuff

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

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



Subject: [PATCH] Avoid using ancient Taint module and use Scalar::Util instead
I am assuming the requirement on the Taint module is back before the Scalar::Util module existed. Taint does not pass its tests for me and I don't see the reason to use it at all when it is replaced by Scalar::Util, a module included with modern versions of perl. I use this patch when packaging Debug-ShowStuff and I provide it here for others.
Subject: scalar-util.patch
diff -ur Debug-ShowStuff-1.11/Makefile.PL Debug-ShowStuff-1.11-patched//Makefile.PL --- Debug-ShowStuff-1.11/Makefile.PL 2010-11-22 14:47:36.000000000 -0800 +++ Debug-ShowStuff-1.11-patched//Makefile.PL 2010-11-22 15:06:03.000000000 -0800 @@ -6,7 +6,7 @@ 'VERSION_FROM' => "ShowStuff.pm", # finds $VERSION 'PREREQ_PM' => { 'Tie::IxHash' => 1.1, - 'Taint' => 0.09, + 'Scalar::Util' => 0, 'MemHandle' => 0.06, }, # e.g., Module::Name => 1.1 diff -ur Debug-ShowStuff-1.11/ShowStuff.pm Debug-ShowStuff-1.11-patched//ShowStuff.pm --- Debug-ShowStuff-1.11/ShowStuff.pm 2010-11-22 14:47:36.000000000 -0800 +++ Debug-ShowStuff-1.11-patched//ShowStuff.pm 2010-11-22 14:49:05.000000000 -0800 @@ -2037,7 +2037,7 @@ sub showtainted { my (@vals) = @_; - require Taint; + require Scalar::Util; # if first value is a hashref, show as hash if (UNIVERSAL::isa $vals[0], 'HASH') { @@ -2047,7 +2047,7 @@ while ( my($key, $val) = each(%$hashref) ) { my ($tainted); - if (Taint::tainted($val)) + if (Scalar::Util::tainted($val)) { $tainted = 'tainted' } else { $tainted = 'not tainted' } @@ -2063,7 +2063,7 @@ foreach my $val (@vals) { my ($tainted); - if (Taint::tainted($val)) + if (Scalar::Util::tainted($val)) { $tainted = 'tainted: ' } else { $tainted = 'not tainted: ' }
On Tue Jan 18 17:08:45 2011, JUSTER wrote: Show quoted text
> I am assuming the requirement on the Taint module is back before the > Scalar::Util module existed. Taint does not pass its tests for me and I > don't see the reason to use it at all when it is replaced by > Scalar::Util, a module included with modern versions of perl. I use this > patch when packaging Debug-ShowStuff and I provide it here for others.
Oops nevermind. It seems you already did this. I saw my patch and thought I'd submit it. I only looked at the bug list and not at the source code so I thought this was still a problem.
Subject: Re: [rt.cpan.org #64902] [PATCH] Avoid using ancient Taint module and use Scalar::Util instead
Date: Wed, 19 Jan 2011 12:34:22 -0500
To: bug-Debug-ShowStuff [...] rt.cpan.org
From: "Miko O'Sullivan" <miko [...] idocs.com>
All good. I'm delighted someone's looking at Debug::ShowStuff. Let me know what you think. Miko On Tue, Jan 18, 2011 at 5:16 PM, Justin Davis via RT <bug-Debug-ShowStuff@rt.cpan.org> wrote: Show quoted text
>       Queue: Debug-ShowStuff >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=64902 > > > On Tue Jan 18 17:08:45 2011, JUSTER wrote:
>> I am assuming the requirement on the Taint module is back before the >> Scalar::Util module existed. Taint does not pass its tests for me and I >> don't see the reason to use it at all when it is replaced by >> Scalar::Util, a module included with modern versions of perl. I use this >> patch when packaging Debug-ShowStuff and I provide it here for others.
> > Oops nevermind. It seems you already did this. I saw my patch and > thought I'd submit it. I only looked at the bug list and not at the > source code so I thought this was still a problem. >
Fixed. On Tue Jan 18 17:08:45 2011, JUSTER wrote: Show quoted text
> I am assuming the requirement on the Taint module is back before the > Scalar::Util module existed. Taint does not pass its tests for me and I > don't see the reason to use it at all when it is replaced by > Scalar::Util, a module included with modern versions of perl. I use this > patch when packaging Debug-ShowStuff and I provide it here for others.