line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: POSIXShellRedirection.pm,v 1.3 2008/11/05 22:52:35 drhyde Exp $ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Devel::AssertOS::OSFeatures::POSIXShellRedirection; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.4'; |
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
732
|
use Devel::CheckOS; |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
176
|
|
8
|
3
|
|
|
3
|
|
15
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
81
|
|
9
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
132
|
|
10
|
3
|
|
|
3
|
|
14
|
no warnings 'redefine'; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
540
|
|
11
|
|
|
|
|
|
|
|
12
|
5
|
|
|
5
|
0
|
36
|
sub matches { return qw(Unix Cygwin BeOS VOS); } |
13
|
3
|
|
|
3
|
0
|
10
|
sub os_is { Devel::CheckOS::os_is(matches()); } |
14
|
|
|
|
|
|
|
Devel::CheckOS::die_unsupported() unless(os_is()); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub expn { |
17
|
1
|
|
|
1
|
0
|
65
|
join("\n", |
18
|
|
|
|
|
|
|
"The operating system's normal shell(s) support POSIX-style redirection", |
19
|
|
|
|
|
|
|
"such as:", |
20
|
|
|
|
|
|
|
" foo | more (piping from one command to another)", |
21
|
|
|
|
|
|
|
" foo > file (redirection of STDOUT to a file)", |
22
|
|
|
|
|
|
|
" foo 2> file (redirection of STDERR to a file)", |
23
|
|
|
|
|
|
|
" foo < file (redirection of STDIN from a file)", |
24
|
|
|
|
|
|
|
"and so on" |
25
|
|
|
|
|
|
|
) |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 NAME |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Devel::AssertOS::OSFeatures::POSIXShellRedirection - check whether |
31
|
|
|
|
|
|
|
the OS we're running on can be expected to support POSIX shell |
32
|
|
|
|
|
|
|
redirection. |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 SYNOPSIS |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
See L and L |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 COPYRIGHT and LICENCE |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Copyright 2007 - 2008 David Cantrell |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=cut |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |