NAME
Convert::yEnc::Decoder - decodes yEncoded files
SYNOPSIS
use Convert::yEnc::Decoder;
$decoder = new Convert::yEnc::Decoder;
$decoder = new Convert::yEnc::Decoder $dir;
$decoder->out_dir($dir);
eval 
{ 
    $decoder->decode( $file);
    $decoder->decode(\*FILE);
    $decoder->decode;
};
print $@ if $@;
$name   = $decoder->name;
$file   = $decoder->file;
$size   = $decoder->size;
$ybegin = $decoder->ybegin;
$ypart  = $decoder->ypart;
$yend   = $decoder->yend;
ABSTRACT
yEnc decoder
DESCRIPTION
Convert::yEnc::Decoder decodes a yEncoded file and writes it to disk. Methods are provided for returning information about the decoded file.
Exports
Nothing.
Methods
- $decoder = 
newConvert::yEnc::Decoder - $decoder = 
newConvert::yEnc::Decoder$dir - 
Creates and returns a new
Convert::yEnc::Decoderobject.Decoded files will be written to $dir. If $dir is omitted, it defaults to the current working directory.
 - $decoder->
out_dir($dir) - 
Sets the output directory to $dir.
 - $decoder->
decode($file) - $decoder->
decode(\*FILE) - $decoder->
decode - 
Decodes a file.
dies if there are any errors.The first form reads from the file named $file. The second form reads from the file handle FILE. The third form reads from
STDIN.The data stream need not begin at the
=yBeginline;decodewill search until it finds it.decodestops reading when it finds the=yendline, soDecodercan decode multiple files from the same data stream.decodemay be called repeatedly on the sameDecoderobject to decode multiple files. - $name = $decoder->
name - 
After a successful decode, returns the name of the file that was created.
 - $file = $decoder->
file - 
After a successful decode, returns the complete path of the file that was created.
 - $size = $decoder->
size - 
After a successful decode, returns the size of the decoded file.
 - $ybegin = $decoder->
ybegin - 
After a successful decode, returns the
=ybeginline. - $ypart = $decoder->
ypart - 
After a successful decode, returns the
=ypartline, or undef if there wasn't one. - $yend = $decoder->
yend - 
After a successful decode, returns the
=yendline. 
NOTES
1-liner
To decode a single file on the command line, write
perl -MConvert::yEnc::Decoder -e 'Convert::yEnc::Decoder->new->decode' < myFile
TODO
CRCs
SEE ALSO
AUTHOR
Steven W McDougall, <swmcd@world.std.com>
COPYRIGHT AND LICENSE
Copyright (c) 2002-2008 by Steven McDougall. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.