OLE::Storage::Iolist - Data management for OLE::Storage::Io (alpha)
Note: OLE::Storage uses Iolists in conjuntion with Io interface for IO operations. An IO entry is a two element list like ($offset, $length).
$NewIolist = $IoL -> aggregate ($method)
Sorts and merges Iolist $IoL, returns the new packed Iolist $NewIolist. Returns an empty Iolist on errors (!to be changed!). $method can be:
method sort offsets allow offset overlaps
1 yes no
2 yes yes
3 no no
4 no yes
($o1, $l1) == $IoL -> append ($o, $l)
Appends an entry to Iolist. Tries to merge the Iolists last entry with the new one. Returns the new last entry of Iolist.
($o, $l) = $IoL -> entry ($i)
rval: Get entry number $i.
($o, $l) == $IoL -> entry ($i, $o, $l)
lval: Set entry number $i to ($o, $l). Returns this entry.
($l) = $IoL -> length ($i)
rval: Get length of entry number $i.
$l == $IoL -> length ($i, $l)
lval: Set length of entry number $i to $l. Returns $l.
$num = $IoL -> max ()
Returns number of $IoL's entries.
$IoL = new Iolist ([\@offset, \@length])
Iolist constructor. Returns an Iolist handle. Can be initialized with references to corresponding offset and length lists.
($o) = $IoL -> offset ($i)
rval: Get offset of entry number $i.
$o == $IoL -> offset ($i, $o)
lval: Set offset of entry number $i to $o. Returns $o.
1 == $IoL -> push ($AnotherIolist)
Appends all entries of $AnotherIolist to $IoL.
$length = $IoL -> sumlen ()
Returns total length of $IoL's entries.
Martin Schwartz <firstname.lastname@example.org>
To install OLE::Storage, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.