Info/FOO.pm

filter: Statementstmt 100% 19 / 19 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 2 totaltotal 92.8% 26 / 28 CC 2 SCAR 2.9
CC
2
Cov
100%
probe
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Info/Magic.pm ↑ Summary Info/Quicktime.pm »
1 package Video::Info::FOO;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 our $VERSION = '0.00';
5  
6 1 ▶use base qw(Video::Info);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 #######################################
9 # use this to define your custom
10 # get/set methods. if they really
11 # belong in Video::Info, let me know
12 #######################################
13 use Class::MakeMethods::Emulator::MethodMaker
14 1 ▶ get_set => [qw( )],
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ;
16  
17 #######################################
18 # leave this intact, add any extra
19 # init stuff you need (maybe a get/set
20 # method?). feel free to override
21 # init_attributes()
22 #######################################
23 1 ▶sub init {
Subroutine init: called CC=1 SCAR=0.0
Pod undocumented
24 1 my $self = shift;
25 1 my %param = @_;
26 1 $self->init_attributes(@_);
27 1 return $self;
28 }
29  
30 #######################################
31 # Obtain the filehandle and extract the
32 # properties from the file. this is
33 # the core function of the module
34 #######################################
35 1 ▶sub probe {
Subroutine probe: called CC=2 SCAR=6.9
Pod undocumented
36 1 my $self = shift;
37  
38 1 my $fh = $self->handle; ## inherited from Video::Info
39  
40 1 ▶ while(<$fh>){
Branch: 1 branch
BranchTrueFalseTotal
if (defined($_ = readline $fh)) 595 1 596
41 #parse it!
42 }
43  
44 #####################################
45 #return 1 for a successful parse
46 #####################################
47 1 return 1;
48 }
49  
50 1 1;
51  
52 __END__
« Info/Magic.pm ↑ Summary Info/Quicktime.pm »