diff options
Diffstat (limited to 'lib/MCE/Grep.pm')
-rw-r--r-- | lib/MCE/Grep.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/MCE/Grep.pm b/lib/MCE/Grep.pm index 3f9fb87..58f4dcd 100644 --- a/lib/MCE/Grep.pm +++ b/lib/MCE/Grep.pm @@ -14,7 +14,7 @@ use Scalar::Util qw( looks_like_number ); use MCE; use MCE::Util; -our $VERSION = '1.514'; $VERSION = eval $VERSION; +our $VERSION = '1.515'; $VERSION = eval $VERSION; ############################################################################### ## ---------------------------------------------------------------------------- @@ -150,7 +150,7 @@ sub mce_grep_f (&@) { _croak("$_tag: '$_file' is not a plain file") unless (-f $_file); $_params->{_file} = $_file; } - elsif (ref $_file eq 'GLOB' || ref $_file eq 'SCALAR') { + elsif (ref $_file eq 'GLOB' || ref $_file eq 'SCALAR' || ref($_file) =~ /^IO::/) { $_params->{_file} = $_file; } else { @@ -227,7 +227,7 @@ sub mce_grep (&@) { my $_input_data; my $_max_workers = $MAX_WORKERS; my $_r = ref $_[0]; - if ($_r eq 'ARRAY' || $_r eq 'CODE' || $_r eq 'GLOB' || $_r eq 'SCALAR') { + if ($_r eq 'ARRAY' || $_r eq 'CODE' || $_r eq 'GLOB' || $_r eq 'SCALAR' || $_r =~ /^IO::/) { $_input_data = shift; } @@ -398,7 +398,7 @@ MCE::Grep - Parallel grep model similar to the native grep function =head1 VERSION -This document describes MCE::Grep version 1.514 +This document describes MCE::Grep version 1.515 =head1 SYNOPSIS |