From: Dylan William Hardison Date: Fri, 28 Apr 2017 17:49:48 +0000 (-0400) Subject: Bug 1361133 - Bugzilla::CPAN: ThrowCodeError() is not imported X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd4b9121d8b3703ac601d88ff5a7d2977ed3600c;p=thirdparty%2Fbugzilla.git Bug 1361133 - Bugzilla::CPAN: ThrowCodeError() is not imported --- 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}; }