NAME
File::Format::RIFF::Chunk - a single RIFF chunk
SYNOPSIS
use File::Format::RIFF;
my ( $chunk ) = new File::Format::RIFF::Chunk;
$chunk->id( 'stuf' );
$chunk->data( 'here is some stuff' );
... some $container ...
$container->push( $chunk );
DESCRIPTION
A File::Format::RIFF::Chunk is a single chunk of data in a RIFF file. It has an identifier and one piece of scalar data. The id must be a four character code, and the data can be any piece of scalar data you wish to store, in any format (it is treated as opaque binary data, so you must interpret it yourself).
CONSTRUCTOR
- $chunk = new File::Format::RIFF::Chunk( $id, $data );
-
Creates a new File::Format::RIFF::Chunk object.
$idis a four character code that identifies the type of data. If$idis not specified, it defaults to ' '.$datais a scalar, treated as opaque binary data. If$datais undef or not specified, it defaults to ''.
METHODS
- $id = $chunk->id;
-
Returns the id of <$chunk>.
- $chunk->id( 'abcd' );
-
Sets the id of
$chunk.$idmust be a four character code that identifies the type of data. - $data = $chunk->data;
-
Returns the data of
$chunk. - $chunk->data( $data );
-
Sets the data of
$chunk.$datais treated as a piece of opaque binary data, not modified or interpreted in any way. - $size = $chunk->size;
-
Returns the size (in bytes) of
$chunk's data.
- $chunk->dump( $max );
-
Prints a string representation of
$chunkto STDOUT. If the data is larger than$maxbytes, prints '[...]' instead of the actual data. If$maxis not specified orundef, it defaults to 64.
AUTHOR
Paul Sturm <sturm@branewave.com>
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 253:
'=item' outside of any '=over'
- Around line 259:
You forgot a '=back' before '=head1'