File::Format::RIFF::List - a single RIFF list


File-Format-RIFF documentation Contained in the File-Format-RIFF distribution.

Index


Code Index:

NAME

Top

File::Format::RIFF::List - a single RIFF list

SYNOPSIS

Top

   use File::Format::RIFF;
   my ( $list ) = new File::Format::RIFF::List;
   $list->type( 'stuf' );
   $list->addChunk( abcd => 'a bunch of data' );
   $list->addList( 'alst' )->addChunk( xyzw => 'more data' );
   print $list->numChunks, "\n";

   ... some $container ...

   $container->push( $list );

DESCRIPTION

Top

A File::Format::RIFF::List is a list of data in a RIFF file. It has an identifier, a type, and an array of data. The id is always 'LIST'. The type must be a four character code, and the data is an array of other RIFF lists and/or RIFF chunks.

CONSTRUCTOR

Top

$list = new File::Format::RIFF::List( $type, $data );

Creates a new File::Format::RIFF::List object. $type is a four character code that identifies the type of this RIFF list. If $type is not specified, it defaults to ' ' (four spaces). $data must be an array reference containing some number of RIFF lists and/or RIFF chunks. If $data is undef or not specified, then the new list object is initialized empty.

SEE ALSO

Top

File::Format::RIFF::List inherits from File::Format::RIFF::Container, so all methods available for Containers can be used on RIFF lists. A Container essentially contains an array of RIFF lists and/or RIFF chunks. See the File::Format::RIFF::Container man page for more information.

AUTHOR

Top

Paul Sturm <sturm@branewave.com>


File-Format-RIFF documentation Contained in the File-Format-RIFF distribution.

package File::Format::RIFF::List;
use base File::Format::RIFF::Container;


our $VERSION = '0.08';


sub new
{
   my ( $proto, $type, $data ) = @_;
   return $proto->SUPER::new( $type, 'LIST', $data );
}


sub read
{
   my ( $proto, $fh ) = @_;
   return $proto->SUPER::read( 'LIST', $fh );
}


1;