Permalink
Browse files

mock PerlIO::get_layers for Perl 5.8.0

  • Loading branch information...
1 parent 23f0124 commit a2a10db02b7851056efbea6e6637cab2f81a095e @xdg xdg committed Jan 23, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/Capture/Tiny.pm
View
@@ -14,7 +14,10 @@ use IO::Handle ();
use File::Spec ();
use File::Temp qw/tempfile tmpnam/;
# Get PerlIO or fake it
-BEGIN { eval { require PerlIO; 1 } or *PerlIO::get_layers = sub { return () }; }
+BEGIN {
+ eval { require PerlIO; PerlIO->can('get_layers') }
+ or *PerlIO::get_layers = sub { return () };
+}
our $VERSION = '0.07';
$VERSION = eval $VERSION; ## no critic

0 comments on commit a2a10db

Please sign in to comment.