diff options
author | 2021-03-01 23:19:42 +0000 | |
---|---|---|
committer | 2021-03-01 23:19:42 +0000 | |
commit | 56d68f1e19ff848c889ecfa71d3a06340ff64892 (patch) | |
tree | 272372e9e82dd675d06054187c7f04b32fe71acc /gnu/usr.bin/perl/cpan/Module-Load-Conditional/lib/Module/Load | |
parent | Import perl-5.32.1 (diff) | |
download | wireguard-openbsd-56d68f1e19ff848c889ecfa71d3a06340ff64892.tar.xz wireguard-openbsd-56d68f1e19ff848c889ecfa71d3a06340ff64892.zip |
Fix merge issues, remove excess files - match perl-5.32.1 dist
OK sthen@
Diffstat (limited to 'gnu/usr.bin/perl/cpan/Module-Load-Conditional/lib/Module/Load')
-rw-r--r-- | gnu/usr.bin/perl/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/gnu/usr.bin/perl/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm b/gnu/usr.bin/perl/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm index 89e22b57207..b0685d2ec12 100644 --- a/gnu/usr.bin/perl/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm +++ b/gnu/usr.bin/perl/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm @@ -22,7 +22,7 @@ BEGIN { $FIND_VERSION $ERROR $CHECK_INC_HASH $FORCE_SAFE_INC ]; use Exporter; @ISA = qw[Exporter]; - $VERSION = '0.68'; + $VERSION = '0.70'; $VERBOSE = 0; $DEPRECATED = 0; $FIND_VERSION = 1; @@ -259,13 +259,19 @@ sub check_install { last DIR unless $FIND_VERSION; ### otherwise, the user wants us to find the version from files - my $mod_info = Module::Metadata->new_from_handle( $fh, $filename ); - my $ver = $mod_info->version( $args->{module} ); - if( defined $ver ) { - $href->{version} = $ver; + { + local $SIG{__WARN__} = sub {}; + my $ver = eval { + my $mod_info = Module::Metadata->new_from_handle( $fh, $filename ); + $mod_info->version( $args->{module} ); + }; - last DIR; + if( defined $ver ) { + $href->{version} = $ver; + + last DIR; + } } } } |