File::Format::RIFF::Container - RIFF Container (Lists and RIFFs)
You should not instantiate a File::Format::RIFF::Container directly; instead, you should instantiate one of its subclasses: either a File::Format::RIFF object, or a File::Format::RIFF::List object.
File::Format::RIFF::Container
File::Format::RIFF::Container is a base class for both RIFF objects and RIFF lists. It is, essentially, an array of other RIFF lists and/or RIFF chunks, and you can add, change, delete, and read them.
Returns the type of $container.
$container
Sets the type of $container. $type must be a four character code, which represents what data will be found in $container.
$type
Returns the id of $container. $container must be either a RIFF object or a List object, so $id will be 'RIFF' or 'LIST', respectively.
$id
Returns the RIFF chunks and/or RIFF lists contained by $container.
Clears out any existing RIFF chunks contained by $container and replaces them with $data. $data must be an array reference containing some number of RIFF lists and/or RIFF chunks.
$data
Returns the number of RIFF lists and/or RIFF chunks contained by $container.
Returns the size (in bytes) of $container's data, when written to a file.
Returns the total size (in bytes) that $container will take up when written out to a file. Total size is the size of the data, plus 12 bytes for the header.
splice, push, pop, unshift, and shift operate analogously to the same-named functions in core perl, acting on $container's array of RIFF lists and/or RIFF chunks. All items added must be RIFF lists or RIFF chunks.
splice
push
pop
unshift
shift
Returns the RIFF list or RIFF chunk at the $ith position in $container's array.
$i
Sets the $ith position in $container's array to $chunk, replacing the previous item. $chunk must be a RIFF list or a RIFF chunk.
$chunk
Creates a new RIFF chunk object with the given $id and $data, appending it to $container's array. Returns the just-created RIFF chunk.
Creates a new List object with the given $type and $data, appending it to $container's array. Returns the just-created RIFF list.
Prints a string representation of $container to STDOUT, recursively printing contained items. If a RIFF chunk's data is larger than $max bytes, prints '[...]' instead of the actual data. If $max is not specified or undef, it defaults to 64.
$max
undef
A RIFF chunk is rendered as:
id: <id> size: <size> (<total size>): <data>
A RIFF container is rendered as:
id: <id> (<type>) size: <size> (<total size>)
Items contained in the RIFF list are recursively printed on subsequent lines, and are indented in one additional tab level.
Paul Sturm <sturm@branewave.com>
To install File::Format::RIFF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::Format::RIFF
CPAN shell
perl -MCPAN -e shell install File::Format::RIFF
For more information on module installation, please visit the detailed CPAN module installation guide.