• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

bin/H28-Jan-2011-856

lib/H28-Jan-2011-32780

t/H28-Jan-2011-405278

xt/release/H03-May-2022-7521

ChangesH A D28-Jan-2011989 3823

LICENSEH A D28-Jan-201111.2 KiB208172

MANIFESTH A D28-Jan-2011317 2423

META.jsonH A D28-Jan-20111.6 KiB7573

META.ymlH A D28-Jan-2011890 4645

Makefile.PLH A D28-Jan-20111.2 KiB6450

READMEH A D28-Jan-20112.5 KiB8158

TodoH A D28-Jan-201134 42

dist.iniH A D28-Jan-2011200 107

README

1NAME
2    Tee - Pure Perl emulation of GNU tee
3
4VERSION
5    version 0.14
6
7SYNOPSIS
8      # from Perl
9      use Tee;
10      tee( $command, @files );
11
12      # from the command line
13      $ cat README.txt | ptee COPY.txt
14
15DESCRIPTION
16    The "Tee" distribution provides the ptee program, a pure Perl emulation
17    of the standard GNU tool "tee". It is designed to be a
18    platform-independent replacement for operating systems without a native
19    "tee" program. As with "tee", it passes input received on STDIN through
20    to STDOUT while also writing a copy of the input to one or more files.
21    By default, files will be overwritten.
22
23    Unlike "tee", "ptee" does not support ignoring interrupts, as signal
24    handling is not sufficiently portable.
25
26    The "Tee" module provides a convenience function that may be used in
27    place of "system()" to redirect commands through "ptee".
28
29USAGE
30  "tee()"
31       tee( $command, @filenames );
32       tee( $command, \%options, @filenames );
33
34    Executes the given command via "system()", but pipes it through ptee to
35    copy output to the list of files. Unlike with "system()", the command
36    must be a string as the command shell is used for redirection and
37    piping. The return value of "system()" is passed through, but reflects
38    the success of the "ptee" command, which isn't very useful.
39
40    The second argument may be a hash-reference of options. Recognized
41    options include:
42
43    *   stderr -- redirects STDERR to STDOUT before piping to ptee (default:
44        false)
45
46    *   append -- passes the "-a" flag to ptee to append instead of
47        overwriting (default: false)
48
49LIMITATIONS
50    Because of the way that "Tee" uses pipes, it is limited to capturing a
51    single input stream, either STDOUT alone or both STDOUT and STDERR
52    combined. A good, portable alternative for capturing these streams from
53    a command separately is IPC::Run3, though it does not allow passing it
54    through to a terminal at the same time.
55
56SEE ALSO
57    *   ptee
58
59    *   IPC::Run3
60
61    *   IO::Tee
62
63BUGS
64    Please report any bugs or feature using the CPAN Request Tracker. Bugs
65    can be submitted through the web interface at
66    <http://rt.cpan.org/Dist/Display.html?Queue=Tee>
67
68    When submitting a bug or request, please include a test-file or a patch
69    to an existing test-file that illustrates the bug or desired feature.
70
71AUTHOR
72    David Golden <dagolden@cpan.org>
73
74COPYRIGHT AND LICENSE
75    This software is Copyright (c) 2006 by David Golden.
76
77    This is free software, licensed under:
78
79      The Apache License, Version 2.0, January 2004
80
81