summaryrefslogtreecommitdiff
path: root/lib/MCE/Grep.pm
diff options
context:
space:
mode:
authorgregor herrmann <gregoa@debian.org>2014-07-26 14:39:21 +0200
committergregor herrmann <gregoa@debian.org>2014-07-26 14:39:21 +0200
commit3dfd8f77865706507e6a97c7793325f2fd131c70 (patch)
treeba560082baf59850ed0ecd987704606a0a75a632 /lib/MCE/Grep.pm
parent0d8e2bfa4e437b7d5f4bc521b98c09ccf6bb3bfb (diff)
Imported Upstream version 1.515
Diffstat (limited to 'lib/MCE/Grep.pm')
-rw-r--r--lib/MCE/Grep.pm8
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