Mercurial > pub > Impl
annotate Lib/IMPL/Test/Straps/ShellExecutor.pm @ 122:a7efb3117295
Fixed bug in IMPL::DOM::Navigator::selectNodes
Fixed bug in IMPL::DOM::Node::selectNodes
renamed operator 'type' to 'typeof' in IMPL::Object::Abstract
A proper implementation of the IMPL::DOM::Node::nodeProperty and a related changes in the IMPL::DOM::Property module, now the last is very simple.
author | wizard |
---|---|
date | Tue, 08 Jun 2010 20:12:45 +0400 |
parents | 16ada169ca75 |
children | 4267a2ac3d46 |
rev | line source |
---|---|
49 | 1 package IMPL::Test::Straps::ShellExecutor; |
2 use strict; | |
3 use warnings; | |
4 | |
5 use base qw(IMPL::Object IMPL::Object::Serializable); | |
6 | |
7 if ($^O =~ /win32/i) { | |
8 require Win32::Console; | |
9 } | |
10 | |
11 sub Execute { | |
12 my ($this,$file) = @_; | |
13 | |
14 my $h; | |
15 | |
16 if ($^O =~ /win32/i) { | |
17 Win32::Console::OutputCP(65001); | |
18 unless ( open $h,'-|',$file ) { | |
19 return undef; | |
20 } | |
21 binmode $h,':encoding(utf-8)'; | |
22 } else { | |
23 unless ( open $h,'-|',$file ) { | |
24 return undef; | |
25 } | |
26 } | |
27 | |
28 return $h; | |
29 } | |
30 | |
31 | |
32 1; |