Skip to content

Commit

Permalink
Merge pull request #1022 from haarg/no-PerlIO-pm
Browse files Browse the repository at this point in the history
use PerlIO::get_layers without loading PerlIO.pm
  • Loading branch information
exodist authored Jan 22, 2025
2 parents bd55b87 + de7e1e4 commit bbde840
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Test2/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ use Config qw/%Config/;
use Carp qw/croak/;

BEGIN {
local ($@, $!, $SIG{__DIE__});
*HAVE_PERLIO = eval { require PerlIO; PerlIO->VERSION(1.02); } ? sub() { 1 } : sub() { 0 };
*HAVE_PERLIO = defined &PerlIO::get_layers ? sub() { 1 } : sub() { 0 };
}

our @EXPORT_OK = qw{
Expand Down

0 comments on commit bbde840

Please sign in to comment.