Skip to content

Commit

Permalink
hopefully fixed issue with pipe open on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
polettix committed May 15, 2015
1 parent 47d5ef9 commit 54c8573
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,4 +1,7 @@
{{$NEXT}}
- hopefully fixed issue with pipe open on Windows

0.973_04 2015-05-10 18:34:31 Europe/Rome
- performance enhancement upon sorting
- added command-line options for sort selection
- added documentation
Expand Down
7 changes: 3 additions & 4 deletions lib/App/Sets/Sort.pm
Expand Up @@ -24,10 +24,9 @@ sub sort_filehandle {
state $has_sort = ! $config->{internal_sort};

if ($has_sort) {
if (open my $fh, '-|', 'sort', '-u', $filename) {
return $fh;
}
WARN "cannot use system sort, falling back to internal implementation";
my $fh;
eval { open $fh, '-|', 'sort', '-u', $filename } and return $fh;
WARN 'cannot use system sort, falling back to internal implementation';
$has_sort = 0; # from now on, use internal sort
}

Expand Down

0 comments on commit 54c8573

Please sign in to comment.