NAME

Convert::yEnc::Entry - an entry in a Convert::yEnc::RC database

SYNOPSIS

use Convert::yEnc::Entry;

$entry = new  Convert::yEnc::Entry { size => 10000 };
$entry = new  Convert::yEnc::Entry { size => 50000,  part => 1 };

$entry = load Convert::yEnc::Entry "10000\t10000";
$entry = load Convert::yEnc::Entry "20000\t1-20000\t1-2";

$ok = $entry->ybegin( { size=>10000	        } );
$ok = $entry->ypart ( { begin=>1, end=>10000	} );
$ok = $entry->yend  ( { size=>10000	        } );

      $entry->complete and ...

print "$entry\n";

ABSTRACT

An entry in a Convert::yEnc::RC database

DESCRIPTION

Convert::yEnc::Entry manages a single entry in a Convert::yEnc::RC database

Exports

Nothing.

Methods

$entry = new Convert::yEnc::Entry \%ybegin

Creates and returns a new Convert::yEnc::Entry object. %ybegin is a hash of key => value pairs from a =ybegin line.

$entry = load Convert::yEnc::Entry $fields

Creates and returns a new Convert::yEnc::Entry object. $fields is the portion of a line from an RC database following the file name.

$ok = $entry->ybegin(\%ybegin)
$ok = $entry->ypart(\%ypart)
$ok = $entry->yend(\%yend)

Updates $entry according to the contents of a =ybegin, =ypart or =yend control line.

The argument is a reference to a hash of key => value pairs from the control line.

Returns true iff the control line is consistent with the current state of $entry.

$entry->complete

Returns true iff all parts of the file described by $entry have been received.

Overloads

"" (stringify)

Serializes a Convert::yEnc::Entry object for storage in an RC database.

SEE ALSO

Convert::yEnc::RC

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.