summaryrefslogtreecommitdiff
path: root/cpan/parent
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2015-06-05 08:51:19 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2015-06-05 08:51:19 +0100
commitbdb6acef8187f28a7ec8f0a352065d6ec4012b94 (patch)
tree1ed161a1a9063f2f615c0f2a88d0d12da158b92c /cpan/parent
parent72b8c7a2166f738711a9747c4906273b38c52517 (diff)
downloadperl-bdb6acef8187f28a7ec8f0a352065d6ec4012b94.tar.gz
Upgrade parent from version 0.232 to 0.234
Diffstat (limited to 'cpan/parent')
-rw-r--r--cpan/parent/lib/parent.pm19
-rw-r--r--cpan/parent/t/parent-pmc.t14
-rw-r--r--cpan/parent/t/parent.t9
3 files changed, 6 insertions, 36 deletions
diff --git a/cpan/parent/lib/parent.pm b/cpan/parent/lib/parent.pm
index 445ed125e9..f6e8cd497d 100644
--- a/cpan/parent/lib/parent.pm
+++ b/cpan/parent/lib/parent.pm
@@ -1,7 +1,7 @@
package parent;
use strict;
use vars qw($VERSION);
-$VERSION = '0.232';
+$VERSION = '0.234';
sub import {
my $class = shift;
@@ -12,10 +12,6 @@ sub import {
shift @_;
} else {
for ( my @filename = @_ ) {
- if ( $_ eq $inheritor ) {
- warn "Class '$inheritor' tried to inherit from itself\n";
- };
-
s{::|'}{/}g;
require "$_.pm"; # dies if the file is not found
}
@@ -94,19 +90,6 @@ either C<.pm> or C<.pmc>), use the following code:
require './plugins/custom.plugin'; # contains Plugin::Custom
use parent -norequire, 'Plugin::Custom';
-=head1 DIAGNOSTICS
-
-=over 4
-
-=item Class 'Foo' tried to inherit from itself
-
-Attempting to inherit from yourself generates a warning.
-
- package Foo;
- use parent 'Foo';
-
-=back
-
=head1 HISTORY
This module was forked from L<base> to remove the cruft
diff --git a/cpan/parent/t/parent-pmc.t b/cpan/parent/t/parent-pmc.t
index a8708b42ba..01f70f71cc 100644
--- a/cpan/parent/t/parent-pmc.t
+++ b/cpan/parent/t/parent-pmc.t
@@ -13,16 +13,10 @@ use Config;
use lib 't/lib';
plan skip_all => ".pmc are only available with 5.6 and later" if $] < 5.006;
-my $no_pmc;
-
-if (Config->can('non_bincompat_options')) {
- foreach(Config::non_bincompat_options()) {
- if($_ eq "PERL_DISABLE_PMC"){
- $no_pmc = 1;
- last;
- }
- }
-};
+
+my $no_pmc = defined &Config::non_bincompat_options
+ ? (grep $_ eq 'PERL_DISABLE_PMC', Config::non_bincompat_options())
+ : ($Config::Config{ccflags} =~ /-DPERL_DISABLE_PMC\b/);
plan skip_all => ".pmc are disabled in this perl"
if $no_pmc;
plan tests => 3;
diff --git a/cpan/parent/t/parent.t b/cpan/parent/t/parent.t
index 8b79862fa4..dedf211e42 100644
--- a/cpan/parent/t/parent.t
+++ b/cpan/parent/t/parent.t
@@ -9,7 +9,7 @@ BEGIN {
}
use strict;
-use Test::More tests => 10;
+use Test::More tests => 9;
use_ok('parent');
@@ -65,13 +65,6 @@ like( $@, $expected, 'baseclass that does not exist');
eval q{use parent 'reallyReAlLyNotexists'};
like( $@, $expected, ' still failing on 2nd load');
-{
- my $warning;
- local $SIG{__WARN__} = sub { $warning = shift };
- eval q{package HomoGenous; use parent 'HomoGenous';};
- like($warning, q{/^Class 'HomoGenous' tried to inherit from itself/},
- ' self-inheriting');
-}
{
BEGIN { $Has::Version_0::VERSION = 0 }