Browse files

I'm not sure if these programs will run on Windows now

or in the future, but the code should be ready to handle it
if it happens
  • Loading branch information...
1 parent 52ec7b5 commit f48f9a5f5d7f4bf8cfad9d91db1dfb3c021a6117 @fjossandon fjossandon committed Dec 28, 2013
Showing with 6 additions and 10 deletions.
  1. +3 −5 lib/Bio/Tools/Run/Genewise.pm
  2. +3 −5 lib/Bio/Tools/Run/Promoterwise.pm
View
8 lib/Bio/Tools/Run/Genewise.pm
@@ -295,9 +295,9 @@ sub _run {
# this is to capture STDERR messages which leak out when you run programs
# with open(FH, "... |");
if (($self->silent && $self->quiet) &&
- ($^O !~ /os2|dos|MSWin32|amigaos/)) {
- # yeah, like genewise is really going to run on Windows...
- $commandstring .= ' 2> /dev/null';
+ ($^O !~ /os2|dos|amigaos/)) {
+ my $null = ($^O =~ m/mswin/i) ? 'NUL' : '/dev/null';
+ $commandstring .= " 2> $null";
}
my ($tfh1,$outfile1) = $self->io->tempfile(-dir=>$self->tempdir);
$self->debug("genewise command = $commandstring");
@@ -460,5 +460,3 @@ sub _subject_dna_seq {
}
1;
-
-
View
8 lib/Bio/Tools/Run/Promoterwise.pm
@@ -260,9 +260,9 @@ sub _run {
# this is to capture STDERR messages which leak out when you run programs
# with open(FH, "... |");
if( ( $self->silent && $self->quiet) &&
- ($^O !~ /os2|dos|MSWin32|amigaos/) ) {
- # yeah, like promoterwise is really going to run on Windows...
- $commandstring .= ' -quiet -silent -erroroffstd 2> /dev/null';
+ ($^O !~ /os2|dos|amigaos/) ) {
+ my $null = ($^O =~ m/mswin/i) ? 'NUL' : '/dev/null';
+ $commandstring .= " -quiet -silent -erroroffstd 2> $null";
}
$self->debug( "promoterwise command = $commandstring");
open(PW, "$commandstring |") ||
@@ -395,5 +395,3 @@ sub _query2_seq{
return $self->{'_query2_seq'};
}
1;
-
-

0 comments on commit f48f9a5

Please sign in to comment.