Upgrade Module::Metadata from version 1.000017 to 1.000018
authorSteve Hay <steve.m.hay@googlemail.com>
Wed, 11 Sep 2013 19:51:04 +0000 (20:51 +0100)
committerSteve Hay <steve.m.hay@googlemail.com>
Wed, 11 Sep 2013 19:51:04 +0000 (20:51 +0100)
The taint.t test can now be included since it no longer uses Test::Fatal.

MANIFEST
Porting/Maintainers.pl
cpan/Module-Metadata/lib/Module/Metadata.pm
cpan/Module-Metadata/t/taint.t [new file with mode: 0644]
pod/perldelta.pod

index 8e16f93..915d418 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1764,6 +1764,7 @@ cpan/Module-Metadata/t/lib/ENDPOD.pm
 cpan/Module-Metadata/t/lib/MBTest.pm
 cpan/Module-Metadata/t/lib/Tie/CPHash.pm
 cpan/Module-Metadata/t/metadata.t
+cpan/Module-Metadata/t/taint.t
 cpan/Module-Metadata/t/version.t
 cpan/NEXT/lib/NEXT.pm          Pseudo-class NEXT for method redispatch
 cpan/NEXT/t/actual.t           NEXT
index 4638ea7..f3b8125 100755 (executable)
@@ -1241,10 +1241,9 @@ use File::Glob qw(:case);
 
     'Module::Metadata' => {
         'MAINTAINER'   => 'dagolden',
-        'DISTRIBUTION' => 'ETHER/Module-Metadata-1.000017.tar.gz',
+        'DISTRIBUTION' => 'ETHER/Module-Metadata-1.000018.tar.gz',
         'FILES'        => q[cpan/Module-Metadata],
         'EXCLUDED'     => [
-            qw(t/taint.t),
             qr{^maint},
             qr{^xt},
         ],
index c7bcb43..a92d05f 100644 (file)
@@ -12,7 +12,7 @@ package Module::Metadata;
 use strict;
 use warnings;
 
-our $VERSION = '1.000017';
+our $VERSION = '1.000018';
 $VERSION = eval $VERSION;
 
 use Carp qw/croak/;
diff --git a/cpan/Module-Metadata/t/taint.t b/cpan/Module-Metadata/t/taint.t
new file mode 100644 (file)
index 0000000..ef527de
--- /dev/null
@@ -0,0 +1,29 @@
+#!/usr/bin/perl -T
+use strict;
+use warnings;
+
+use 5.008000;   # for ${^TAINT}
+use Test::More tests => 2;
+use Module::Metadata;
+use Carp 'croak';
+
+# stolen liberally from Class-Tiny/t/lib/TestUtils.pm - thanks xdg!
+sub exception(&) {
+    my $code = shift;
+    my $success = eval { $code->(); 1 };
+    my $err = $@;
+    return undef if $success;   # original returned ''
+    croak "Execution died, but the error was lost" unless $@;
+    return $@;
+}
+
+ok(${^TAINT}, 'taint flag is set');
+
+# without the fix, we get:
+# Insecure dependency in eval while running with -T switch at lib/Module/Metadata.pm line 668, <GEN0> line 15.
+is(
+    exception { Module::Metadata->new_from_module( "Module::Metadata" )->version },
+    undef,
+    'no exception',
+);
+
index 23ed7d5..c166c09 100644 (file)
@@ -325,7 +325,7 @@ C<requires> has been made more robust. [cpan #83728]
 
 =item *
 
-L<Module::Metadata> has been upgraded from version 1.000014 to 1.000017.
+L<Module::Metadata> has been upgraded from version 1.000014 to 1.000018.
 
 The module's DESCRIPTION has been re-worded regarding safety/security to
 satisfy CVE-2013-1437.  Also, versions are now detainted if needed. [cpan