summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/CPAN.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/Bugzilla/CPAN.pm b/Bugzilla/CPAN.pm
index 8f6749330..d765d2901 100644
--- a/Bugzilla/CPAN.pm
+++ b/Bugzilla/CPAN.pm
@@ -82,8 +82,11 @@ sub has_feature {
return $FEATURE{$feature_name} if exists $FEATURE{ $feature_name };
my $meta = $class->cpan_meta;
- my $feature = eval { $meta->feature($feature_name) }
- or ThrowCodeError('invalid_feature', { feature => $feature_name });
+ my $feature = eval { $meta->feature($feature_name) };
+ unless ($feature) {
+ require Bugzilla::Error;
+ Bugzilla::Error::ThrowCodeError('invalid_feature', { feature => $feature_name });
+ }
return $FEATURE{$feature_name} = check_cpan_feature($feature)->{ok};
}