| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package File::Format::RIFF::List; |
|
2
|
3
|
|
|
3
|
|
18
|
use base File::Format::RIFF::Container; |
|
|
3
|
|
|
|
|
7
|
|
|
|
3
|
|
|
|
|
798
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.08'; |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new |
|
9
|
|
|
|
|
|
|
{ |
|
10
|
3
|
|
|
3
|
1
|
111
|
my ( $proto, $type, $data ) = @_; |
|
11
|
3
|
|
|
|
|
21
|
return $proto->SUPER::new( $type, 'LIST', $data ); |
|
12
|
|
|
|
|
|
|
} |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub read |
|
16
|
|
|
|
|
|
|
{ |
|
17
|
0
|
|
|
0
|
0
|
|
my ( $proto, $fh ) = @_; |
|
18
|
0
|
|
|
|
|
|
return $proto->SUPER::read( 'LIST', $fh ); |
|
19
|
|
|
|
|
|
|
} |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=pod |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 NAME |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
File::Format::RIFF::List - a single RIFF list |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
use File::Format::RIFF; |
|
34
|
|
|
|
|
|
|
my ( $list ) = new File::Format::RIFF::List; |
|
35
|
|
|
|
|
|
|
$list->type( 'stuf' ); |
|
36
|
|
|
|
|
|
|
$list->addChunk( abcd => 'a bunch of data' ); |
|
37
|
|
|
|
|
|
|
$list->addList( 'alst' )->addChunk( xyzw => 'more data' ); |
|
38
|
|
|
|
|
|
|
print $list->numChunks, "\n"; |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
... some $container ... |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
$container->push( $list ); |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
A C is a list of data in a RIFF file. It has an |
|
47
|
|
|
|
|
|
|
identifier, a type, and an array of data. The id is always 'LIST'. The |
|
48
|
|
|
|
|
|
|
type must be a four character code, and the data is an array of other RIFF |
|
49
|
|
|
|
|
|
|
lists and/or RIFF chunks. |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=over 4 |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=item $list = new File::Format::RIFF::List( $type, $data ); |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Creates a new File::Format::RIFF::List object. C<$type> is a four character |
|
58
|
|
|
|
|
|
|
code that identifies the type of this RIFF list. If C<$type> is not |
|
59
|
|
|
|
|
|
|
specified, it defaults to C<' '> (four spaces). C<$data> must be an |
|
60
|
|
|
|
|
|
|
array reference containing some number of RIFF lists and/or RIFF chunks. |
|
61
|
|
|
|
|
|
|
If C<$data> is C or not specified, then the new list object is |
|
62
|
|
|
|
|
|
|
initialized empty. |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=back |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=over 4 |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
C inherits from C, |
|
71
|
|
|
|
|
|
|
so all methods available for Containers can be used on RIFF lists. A |
|
72
|
|
|
|
|
|
|
Container essentially contains an array of RIFF lists and/or RIFF chunks. |
|
73
|
|
|
|
|
|
|
See the L man page for more information. |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=back |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 AUTHOR |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Paul Sturm EIE |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=cut |