File Coverage

blib/lib/File/Headerinfo/SWF.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 23 23 100.0


line stmt bran cond sub pod time code
1             package File::Headerinfo::SWF;
2              
3 1     1   12 use strict;
  1         3  
  1         207  
4 1     1   66 use base qw(File::Headerinfo);
  1         4  
  1         201  
5 1     1   1898 use SWF::Header;
  1         42736  
  1         151  
6              
7             =head1 NAME
8              
9             File::Headerinfo::SWF - an extractor of useful information from shockwave files.
10              
11             =head1 DESCRIPTION
12              
13             I uses SWF::Header to read the headers of .swf files and extract useful information like their duration, dimensions and framerate.
14              
15             =cut
16              
17             sub parse_file {
18 1     1 1 3 my $self = shift;
19 1         10 my $header = SWF::Header->read_file( $self->path );
20 1         84793 $self->filetype('swf');
21 1         10 $self->width($header->{width});
22 1         10 $self->height($header->{height});
23 1         9 $self->duration($header->{duration});
24 1         10 $self->fps($header->{rate});
25 1         10 $self->filesize($header->{filelen});
26 1         10 $self->version($header->{version});
27             }
28              
29             =head1 COPYRIGHT
30              
31             Copyright 2004 William Ross (wross@cpan.org)
32              
33             This library is free software; you can redistribute it
34             and/or modify it under the same terms as Perl itself.
35              
36             =head1 SEE ALSO
37              
38             L, L
39              
40             =cut
41              
42             1;