diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-04-28 19:49:48 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2017-05-01 22:22:34 +0200 |
commit | dd4b9121d8b3703ac601d88ff5a7d2977ed3600c (patch) | |
tree | 2aadda54eed2ddf29d1b5ab693fd2eb2b1c56280 /Bugzilla | |
parent | 54af7955b30636d31fa82693c25df11085f43a6d (diff) | |
download | bugzilla-dd4b9121d8b3703ac601d88ff5a7d2977ed3600c.tar.gz bugzilla-dd4b9121d8b3703ac601d88ff5a7d2977ed3600c.tar.xz |
Bug 1361133 - Bugzilla::CPAN: ThrowCodeError() is not imported
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/CPAN.pm | 7 |
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}; } |