Skip to content

Commit

Permalink
Upgrade Module::Metadata from version 1.000016 to 1.000017
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-m-hay committed Sep 11, 2013
1 parent 054559e commit bff978f
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 6 deletions.
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Porting/Maintainers.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ package Maintainers;

'Module::Metadata' => {
'MAINTAINER' => 'dagolden',
'DISTRIBUTION' => 'ETHER/Module-Metadata-1.000016.tar.gz',
'DISTRIBUTION' => 'ETHER/Module-Metadata-1.000017.tar.gz',
'FILES' => q[cpan/Module-Metadata],
'EXCLUDED' => [
qr{^maint},
Expand Down
9 changes: 6 additions & 3 deletions cpan/Module-Metadata/lib/Module/Metadata.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ package Module::Metadata;
# parrot future to look at other types of modules).

use strict;
use vars qw($VERSION);
$VERSION = '1.000016';
use warnings;

our $VERSION = '1.000017';
$VERSION = eval $VERSION;

use Carp qw/croak/;
Expand Down Expand Up @@ -649,7 +650,7 @@ sub _evaluate_version_line {
# compiletime/runtime issues with local()
my $vsub;
$pn++; # everybody gets their own package
my $eval = qq{BEGIN { q# Hide from _packages_inside()
my $eval = qq{BEGIN { my \$dummy = q# Hide from _packages_inside()
#; package Module::Metadata::_version::p$pn;
use version;
no strict;
Expand All @@ -662,6 +663,8 @@ sub _evaluate_version_line {
};
}};

$eval = $1 if $eval =~ m{^(.+)}s;

local $^W;
# Try to get the $VERSION
eval $eval;
Expand Down
1 change: 1 addition & 0 deletions cpan/Module-Metadata/t/encoding.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!perl

use strict;
use warnings;
use File::Spec;
use Test::More;

Expand Down
4 changes: 4 additions & 0 deletions cpan/Module-Metadata/t/lib/DistGen.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package DistGen;

use strict;
use warnings;

use vars qw( $VERSION $VERBOSE @EXPORT_OK);

Expand Down Expand Up @@ -182,6 +183,7 @@ sub _gen_default_filedata {
\$VERSION = '0.01';
use strict;
use warnings;
1;
Expand All @@ -205,6 +207,7 @@ sub _gen_default_filedata {
$self->$add_unless('t/basic.t', undent(<<" ---"));
use Test::More tests => 1;
use strict;
use warnings;
use $self->{name};
ok 1;
Expand Down Expand Up @@ -470,6 +473,7 @@ sub change_build_pl {

$self->change_file( 'Build.PL', undent(<<" ---") );
use strict;
use warnings;
use Module::Build;
my \$b = Module::Build->new(
# Some CPANPLUS::Dist::Build versions need to allow mismatches
Expand Down
1 change: 1 addition & 0 deletions cpan/Module-Metadata/t/lib/MBTest.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package MBTest;

use strict;
use warnings;

use IO::File ();
use File::Spec;
Expand Down
1 change: 1 addition & 0 deletions cpan/Module-Metadata/t/lib/Tie/CPHash.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package Tie::CPHash;

require 5.000;
use strict;
use warnings;
use vars qw(@ISA $VERSION);

@ISA = qw();
Expand Down
1 change: 1 addition & 0 deletions cpan/Module-Metadata/t/metadata.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# vim:ts=8:sw=2:et:sta:sts=2

use strict;
use warnings;
use lib 't/lib';
use IO::File;
use MBTest;
Expand Down
20 changes: 20 additions & 0 deletions cpan/Module-Metadata/t/taint.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/perl -T
use strict;
use warnings;

use 5.008000; # for ${^TAINT}
use Module::Metadata;
use Test::More;
use Test::Fatal;

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',
);

done_testing;
1 change: 1 addition & 0 deletions cpan/Module-Metadata/t/version.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use strict;
use warnings;
use Test::More;
use Module::Metadata;
use lib "t/lib/0_2";
Expand Down
5 changes: 3 additions & 2 deletions pod/perldelta.pod
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,11 @@ C<requires> has been made more robust. [cpan #83728]

=item *

L<Module::Metadata> has been upgraded from version 1.000014 to 1.000016.
L<Module::Metadata> has been upgraded from version 1.000014 to 1.000017.

The module's DESCRIPTION has been re-worded regarding safety/security to
satisfy CVE-2013-1437.
satisfy CVE-2013-1437. Also, versions are now detainted if needed. [cpan
#88576]

=item *

Expand Down

0 comments on commit bff978f

Please sign in to comment.