Skip to content
This repository has been archived by the owner on Aug 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #292 from haarg-contrib/mp-no-deprecate
Browse files Browse the repository at this point in the history
silence deprecated warnings when loading Module::Pluggable from core
  • Loading branch information
exodist authored Apr 25, 2024
2 parents fe52f2c + ab19ec2 commit ba4ef31
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Test2/Tools/Tester.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ use Carp qw/croak/;
use Test2::Util::Ref qw/rtype/;

BEGIN {
if (eval { require Module::Pluggable; 1 }) {
if (eval {
no warnings 'deprecated';
require Module::Pluggable;
1;
}) {
Module::Pluggable->import(search_path => ['Test2::EventFacet'], require => 1);
}
else {
Expand Down

0 comments on commit ba4ef31

Please sign in to comment.