Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 495bfbf

Browse files
author
Reini Urban
committed
parent: Update to 0.236
improved t/parent-pmc.t, excluded new xt tests
1 parent aa65c01 commit 495bfbf

File tree

8 files changed

+133
-10
lines changed

8 files changed

+133
-10
lines changed

MANIFEST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2062,6 +2062,7 @@ cpan/parent/t/parent-classfromfile.t tests for parent.pm
20622062
cpan/parent/t/parent-pmc.t tests for parent.pm
20632063
cpan/parent/t/parent-returns-false.t tests for parent.pm
20642064
cpan/parent/t/parent.t tests for parent.pm
2065+
cpan/parent/t/rt62341.t.disabled
20652066
cpan/perlfaq/lib/perlfaq1.pod General Questions About Perl
20662067
cpan/perlfaq/lib/perlfaq2.pod Obtaining and Learning about Perl
20672068
cpan/perlfaq/lib/perlfaq3.pod Programming Tools

Porting/Maintainers.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,8 +1052,9 @@ package Maintainers;
10521052
},
10531053

10541054
'parent' => {
1055-
'DISTRIBUTION' => 'CORION/parent-0.234.tar.gz',
1055+
'DISTRIBUTION' => 'CORION/parent-0.236.tar.gz',
10561056
'FILES' => q[cpan/parent],
1057+
'EXCLUDED' => [qr{^xt/}],
10571058
},
10581059

10591060
# merged upstream with CPAN-Meta

cpan/parent/lib/parent.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package parent;
22
use strict;
33
use vars qw($VERSION);
4-
$VERSION = '0.234';
4+
$VERSION = '0.236';
55

66
sub import {
77
my $class = shift;
@@ -19,11 +19,11 @@ sub import {
1919

2020
{
2121
no strict 'refs';
22-
push @{"$inheritor\::ISA"}, @_;
22+
push @{"$inheritor\::ISA"}, @_; # dies if a loop is detected
2323
};
2424
};
2525

26-
"All your base are belong to us"
26+
1;
2727

2828
__END__
2929

cpan/parent/t/parent-pmc.t

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,25 @@ use lib 't/lib';
1414

1515
plan skip_all => ".pmc are only available with 5.6 and later" if $] < 5.006;
1616

17-
my $no_pmc = defined &Config::non_bincompat_options
18-
? (grep $_ eq 'PERL_DISABLE_PMC', Config::non_bincompat_options())
19-
: ($Config::Config{ccflags} =~ /-DPERL_DISABLE_PMC\b/);
20-
plan skip_all => ".pmc are disabled in this perl"
21-
if $no_pmc;
17+
# Skip this test if perl is compiled with PERL_DISABLE_PMC
18+
#
19+
my $pmc = 1;
20+
if (Config->can('non_bincompat_options')) { # $] ge '5.014'
21+
$pmc = 0
22+
if grep { $_ eq 'PERL_DISABLE_PMC' } Config::non_bincompat_options();
23+
} elsif (eval {
24+
require Config::Perl::V;
25+
Config::Perl::V->VERSION('0.10');
26+
}) {
27+
$pmc = 0
28+
if Config::Perl::V::myconfig()->{options}{PERL_DISABLE_PMC};
29+
} else {
30+
$pmc = 0
31+
if $Config::Config{ccflags} =~ /(?:^|\s)-DPERL_DISABLE_PMC\b/;
32+
}
33+
34+
plan skip_all => 'Perl is built with PERL_DISABLE_PMC' unless $pmc;
35+
2236
plan tests => 3;
2337

2438
use vars qw($got_here);

cpan/parent/t/rt62341.t.disabled

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
#!perl -w
2+
use strict;
3+
use Benchmark qw/cmpthese/;
4+
use Test::More tests => 1;
5+
6+
{
7+
package Bench::Base;
8+
sub foo { 1 };
9+
}
10+
11+
my $c;
12+
my $sub_iter = 100;
13+
14+
cmpthese (-1 => {
15+
recompute_existing_ISA => sub {
16+
$c++;
17+
for (1..$sub_iter) {
18+
my $class = "Bench::Par::Sub_${c}";
19+
no strict 'refs';
20+
@{ "$class\::ISA"} = (@{ "$class\::ISA"},'Bench::Base');
21+
die unless $class->foo;
22+
}
23+
},
24+
recompute_new_ISA => sub {
25+
$c++;
26+
for (1..$sub_iter) {
27+
my $class = "Bench::Par::Sub_${c}::SubSub${_}";
28+
no strict 'refs';
29+
@{ "$class\::ISA"} = (@{ "$class\::ISA"},'Bench::Base');
30+
die unless $class->foo;
31+
}
32+
},
33+
push_existing_ISA => sub {
34+
$c++;
35+
for (1..$sub_iter) {
36+
my $class = "Bench::Par::Sub_${c}";
37+
no strict 'refs';
38+
push @{ "$class\::ISA"}, 'Bench::Base';
39+
die unless $class->foo;
40+
}
41+
},
42+
push_new_ISA => sub {
43+
$c++;
44+
for (1..$sub_iter) {
45+
my $class = "Bench::Par::Sub_${c}::SubSub${_}";
46+
no strict 'refs';
47+
push @{ "$class\::ISA"}, 'Bench::Base';
48+
die unless $class->foo;
49+
}
50+
},
51+
push_new_FOO => sub {
52+
$c++;
53+
for (1..$sub_iter) {
54+
my $class = "Bench::Par::Sub_${c}::SubSub${_}";
55+
no strict 'refs';
56+
push @{ "$class\::FOO"}, 'Bench::Base';
57+
#die unless $class->foo;
58+
}
59+
},
60+
push_existing_FOO => sub {
61+
$c++;
62+
for (1..$sub_iter) {
63+
my $class = "Bench::Par::Sub_${c}";
64+
no strict 'refs';
65+
push @{ "$class\::FOO"}, 'Bench::Base';
66+
#die unless $class->foo;
67+
}
68+
},
69+
recompute_existing_FOO => sub {
70+
$c++;
71+
for (1..$sub_iter) {
72+
my $class = "Bench::Par::Sub_${c}";
73+
no strict 'refs';
74+
@{ "$class\::FOO"} = (@{ "$class\::FOO"}, 'Bench::Base');
75+
#die unless $class->foo;
76+
}
77+
},
78+
79+
# Take a reference and manipulate that, in case string references are slow
80+
refcompute_existing_FOO => sub {
81+
$c++;
82+
for (1..$sub_iter) {
83+
my $class = "Bench::Par::Sub_${c}";
84+
no strict 'refs';
85+
my $aref = \@{ "$class\::FOO"};
86+
@{ $aref } = (@{ $aref }, 'Bench::Base');
87+
#die unless $class->foo;
88+
}
89+
},
90+
recompute_new_FOO => sub {
91+
$c++;
92+
for (1..$sub_iter) {
93+
my $class = "Bench::Par::Sub_${c}::SubSub${_}";
94+
no strict 'refs';
95+
@{ "$class\::FOO"} = (@{ "$class\::FOO"}, 'Bench::Base');
96+
#die unless $class->foo;
97+
}
98+
},
99+
});
100+
101+
pass "Benchmarks run";

dist/Module-CoreList/lib/Module/CoreList.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13367,6 +13367,7 @@ for my $version ( sort { version_sort($a, $b) } keys %released ) {
1336713367
'Term::ReadKey' => '2.37_01',
1336813368
'Thread::Semaphore' => '2.13',
1336913369
'Time::Local' => '1.24',
13370+
'parent' => '0.236',
1337013371
'Cpanel::JSON::XS' => '3.0218',
1337113372
'CPAN::Meta' => '2.150010c',
1337213373
'CPAN::Meta::Converter' => '2.150010',

pod/perlcdelta.pod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,11 @@ Added C<down_timed> method.
453453

454454
reformatted
455455

456+
=item parent 0.236
457+
458+
improved t/parent-pmc.t,
459+
excluded new xt tests
460+
456461
=back
457462

458463
=head1 Documentation

t/porting/customized.dat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ File::Path cpan/File-Path/t/Path_win32.t 94b9276557ce7f80b91f6fd9bfa7a0cd9bf9683
6262
File::Spec dist/PathTools/t/rel2abs_vs_symlink.t abbf1a890a1b6fefebc0c8a9e2849694ade89fa9
6363
IO::Socket::IP cpan/IO-Socket-IP/lib/IO/Socket/IP.pm fb1175286262913bec59482b84a3587ec48339ea
6464
JSON::PP cpan/JSON-PP/lib/JSON/PP.pm ea210ef037088b8ff77db8a0c149e09032a4beab
65-
Module::CoreList dist/Module-CoreList/lib/Module/CoreList.pm 1afa5af156f75947d09704ed28825c7ee170185c
65+
Module::CoreList dist/Module-CoreList/lib/Module/CoreList.pm e56b4f5c3ddffe21bd712ba5f50c7abb3499382f
6666
Module::CoreList dist/Module-CoreList/lib/Module/CoreList/Utils.pm c968b0977900360ef0cf739ee9f9c6be6ce91afc
6767
Module::Metadata cpan/Module-Metadata/t/lib/GeneratePackage.pm 502ffbe2609947430e6aa1a3df8064b3fef3e086
6868
Net::Domain cpan/libnet/lib/Net/Cmd.pm 70a007c38833667ad47ea8059c37c1b7d1c77b6c

0 commit comments

Comments
 (0)