AutoTeX/Fileset.pm

filter: Statementstmt 40.7% 11 / 27 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 3 / 6 Podpod 100% 3 / 3 totaltotal 34.6% 17 / 49 CC 6 SCAR 24.0
CC
6
Cov
29%
new
20.0
new_File
12.0
override
2.0
CRAP 11.0
« AutoTeX/Log.pm ↑ Summary AutoTeX/Exception.pm »
1 package TeX::AutoTeX::Fileset;
2  
3 #
4 # $Id: Fileset.pm,v 1.8.2.4 2011/01/03 04:06:00 thorstens Exp $
5 # $Revision: 1.8.2.4 $
6 # $Source: /cvsroot/arxivlib/arXivLib/lib/TeX/AutoTeX/Fileset.pm,v $
7 #
8 # $Date: 2011/01/03 04:06:00 $
9 # $Author: thorstens $
10 #
11  
12 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 ### use warnings;
14 2 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 2 our ($VERSION) = '$Revision: 1.8.2.4 $' =~ m{ \$Revision: \s+ (\S+) }x;
17  
18 2 ▶use TeX::AutoTeX::File;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 0 ▶sub new {
Subroutine new: not called CC=4 SCAR=30.0
Pod documented
21 0 my $that = shift;
22 0 ▶ my $class = ref($that) || $that;
Condition0%0/3
ref $that || $that
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $that || $that
ref $that $that
Truth table0%0/3
A || B
A= ref $thatB= $that
ABresult
1X1
011
000
23 0 my $self = {
24 log => undef,
25 dir => undef,
26 cache => {},
27 local_hyper_transform => undef,
28 override => {
29 ignore => 'TYPE_IGNORE',
30 include => 'TYPE_INCLUDE',
31 },
32 @_
33 };
34 0 ▶ if (!defined $self->{log}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $self->{"log"}) 0 0 0
35 0 throw TeX::AutoTeX::FatalException 'No log configuration supplied';
36 }
37 0 ▶ if (!defined $self->{dir}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $self->{"dir"}) 0 0 0
38 0 throw TeX::AutoTeX::FatalException 'No directory specified';
39 }
40 0 bless $self, $class;
41 }
42  
43 0 ▶sub new_File {
Subroutine new_File: not called CC=3 SCAR=24.8
Pod documented
44 0 my ($self, $filename) = @_;
45  
46 0 ▶ if (!defined $filename) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $filename) 0 0 0
47 0 throw TeX::AutoTeX::FatalException 'no filename provided to new_File()';
48 }
49 0 ▶ if ($self->{cache}->{$filename}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"cache"}{$filename}) 0 0 0
50 0 return $self->{cache}->{$filename};
51 }
52 0 $self->{cache}->{$filename} = TeX::AutoTeX::File->new($self, $filename);
53 }
54  
55 0 ▶sub override {
Subroutine override: not called CC=1 SCAR=6.9
Pod documented
56 0 my ($self, $type) = @_;
57 0 return $self->{override}->{$type};
58 }
59  
60 2 1;
61  
62 __END__
« AutoTeX/Log.pm ↑ Summary AutoTeX/Exception.pm »