summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2011-03-14 16:57:16 +0000
committerLeon Brocard <acme@astray.com>2011-06-08 09:10:51 +0100
commitd0cca66ff7e372feba2646aa5608be5b76daa613 (patch)
treee48311a8dfbdb44269b7707b893147f11d15ee26
parentd978b4854ea39fa29e2ca7dead0e063a9ea4eb13 (diff)
downloadperl-d0cca66ff7e372feba2646aa5608be5b76daa613.tar.gz
Resolved RT #59511 for Module::CoreList
Silenced the 'Can't call method "isa" without a package or object reference' warnings for the functions. (cherry picked from commit 95effdf194acae64a4ab711dc3d35da13872afdd)
-rw-r--r--dist/Module-CoreList/Changes2
-rw-r--r--dist/Module-CoreList/lib/Module/CoreList.pm10
2 files changed, 7 insertions, 5 deletions
diff --git a/dist/Module-CoreList/Changes b/dist/Module-CoreList/Changes
index 1809ace194..054e46efa2 100644
--- a/dist/Module-CoreList/Changes
+++ b/dist/Module-CoreList/Changes
@@ -1,3 +1,5 @@
+ - Resolved RT #59511
+
2.45 Sun Feb 20 2011
- Bumped the version number and data for the 5.13.10 release
diff --git a/dist/Module-CoreList/lib/Module/CoreList.pm b/dist/Module-CoreList/lib/Module/CoreList.pm
index 448f6278f5..678d2af686 100644
--- a/dist/Module-CoreList/lib/Module/CoreList.pm
+++ b/dist/Module-CoreList/lib/Module/CoreList.pm
@@ -213,7 +213,7 @@ END {
sub first_release_raw {
my $module = shift;
- $module = shift if $module->isa(__PACKAGE__)
+ $module = shift if eval { $module->isa(__PACKAGE__) }
and scalar @_ and $_[0] =~ m#\A[a-zA-Z_][0-9a-zA-Z_]*(?:(::|')[0-9a-zA-Z_]+)*\z#;
my $version = shift;
@@ -239,7 +239,7 @@ sub first_release {
sub find_modules {
my $regex = shift;
- $regex = shift if $regex->isa(__PACKAGE__);
+ $regex = shift if eval { $regex->isa(__PACKAGE__) };
my @perls = @_;
@perls = keys %version unless @perls;
@@ -254,14 +254,14 @@ sub find_modules {
sub find_version {
my $v = shift;
- $v = shift if $v->isa(__PACKAGE__);
+ $v = shift if eval { $v->isa(__PACKAGE__) };
return $version{$v} if defined $version{$v};
return undef;
}
sub is_deprecated {
my $module = shift;
- $module = shift if $module->isa(__PACKAGE__)
+ $module = shift if eval { $module->isa(__PACKAGE__) }
and scalar @_ and $_[0] =~ m#\A[a-zA-Z_][0-9a-zA-Z_]*(?:(::|')[0-9a-zA-Z_]+)*\z#;
my $perl_version = shift;
$perl_version ||= $];
@@ -281,7 +281,7 @@ sub removed_from_by_date {
sub removed_raw {
my $mod = shift;
- $mod = shift if $mod->isa(__PACKAGE__)
+ $mod = shift if eval { $mod->isa(__PACKAGE__) }
and scalar @_ and $_[0] =~ m#\A[a-zA-Z_][0-9a-zA-Z_]*(?:(::|')[0-9a-zA-Z_]+)*\z#;
return unless my @perls = sort { $a cmp $b } first_release_raw($mod);
my $last = pop @perls;