6 use vars qw($VERSION) ;
9 use Filter::Util::Exec ;
13 my($self, @args) = @_ ;
15 croak ("Usage: use Filter::sh 'command'")
18 #require "Filter/exec.pm" ;
19 #Filter::exec::import ($self, 'sh', '-c', "@args") ;
20 if ($^O eq 'MSWin32') {
21 Filter::Util::Exec::filter_add ($self, 'cmd', '/c', "@args") ;
24 Filter::Util::Exec::filter_add ($self, 'sh', '-c', "@args") ;
33 Filter::sh - sh source filter
37 use Filter::sh 'command' ;
41 This filter pipes the current source file through the program which
42 corresponds to the C<command> parameter using the Bourne shell.
44 As with all source filters its scope is limited to the current source
45 file only. Every file you want to be processed by the filter must have a
47 use Filter::sh 'command' ;
51 Here is an example script which uses the filter:
53 use Filter::sh 'tr XYZ PQR' ;
55 print "XYZ a = $a\n" ;
57 And here is what it will output:
63 You should be I<very> careful when using this filter. Because of the
64 way the filter is implemented it is possible to end up with deadlock.
66 Be especially careful when stacking multiple instances of the filter in