Command-Run

 view release on metacpan or  search on metacpan

lib/Command/Run/Tmpfile.pm  view on Meta::CPAN

=head1 METHODS

=over 4

=item B<new>([raw => I<bool>])

Create a new temporary file object.

By default the underlying file handle is opened with the
C<:encoding(utf8)> layer, so character strings are encoded to UTF-8 on
write and decoded on read.

When C<raw> is true, the C<:raw> layer is used instead, making the file
a transparent byte container: whatever bytes are written are stored and
read back unchanged.  Use this when you write data that is already a
byte stream (for example the output of an external command captured with
C<qx//>, or the result of C<encode 'utf8', ...>), to avoid double
encoding.

    my $tmp = Command::Run::Tmpfile->new(raw => 1);
    $tmp->write($bytes)->rewind;



( run in 0.701 second using v1.01-cache-2.11-cpan-600a1bdf6e4 )