lib/Panotools/Script/Line/Option.pm

filter: Statementstmt 80.0% 28 / 35 Branchbran 25.0% 1 / 4 Conditioncond 40.0% 2 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 87.5% 7 / 8 Podpod 0.0% 0 / 5 totaltotal 63.3% 38 / 60 CC 7 SCAR 14.1
CC
7
Cov
70%
Report
12.0
Assemble
3.1
new
2.1
CRAP 4.1
« lib/Panotools/Makefile/Rule.pm ↑ Summary blib/lib/Panotools/Makefile.pm »
1 package Panotools::Script::Line::Option;
2  
3 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 =head1 NAME
7  
8 Panotools::Script::Line::Option - Hugin Options
9  
10 =head1 SYNOPSIS
11  
12 Option parameters are described by a line beginning with '#hugin_'
13  
14 =head1 DESCRIPTION
15  
16 =cut
17  
18 sub new
19 16 ▶{
Subroutine new: called CC=2 SCAR=7.2
Pod undocumented
20 16 my $class = shift;
21 16 ▶ $class = ref $class || $class;
Condition33%1/3
ref $class || $class
l!l&&r!l&&!r
0160
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table33%1/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
22 16 my $self = bless {}, $class;
23 16 $self->_defaults;
24 16 return $self;
25 }
26  
27 sub _defaults
28 16 ▶{
Subroutine _defaults: called CC=1 SCAR=0.0
29 16 my $self = shift;
30 16 %{$self} =
31 (optimizeReferenceImage => 0,
32 blender => 'enblend',
33 remapper => 'nona',
34 enblendOptions => '',
35 enfuseOptions => '',
36 hdrmergeOptions => '',
37 outputLDRBlended => 'true',
38 outputLDRLayers => 'false',
39 outputLDRExposureRemapped => 'false',
40 outputLDRExposureLayers => 'false',
41 outputLDRExposureBlended => 'false',
42 outputHDRBlended => 'false',
43 outputHDRLayers => 'false',
44 outputHDRStacks => 'false',
45 outputLayersCompression => 'PACKBITS',
46 outputImageType => 'tif',
47 outputImageTypeCompression => 'NONE',
48 outputJPEGQuality => 100,
49 outputImageTypeHDR => 'exr',
50 outputImageTypeHDRCompression => '');
51 }
52  
53 sub Identifier
54 142 ▶{
Subroutine Identifier: called CC=1 SCAR=0.0
Pod undocumented
55 142 my $self = shift;
56 142 return "#hugin_";
57 }
58  
59 sub Parse
60 5 ▶{
Subroutine Parse: called CC=2 SCAR=7.0
Pod undocumented
61 5 my $self = shift;
62 5 ▶ my $string = shift || return 0;
Condition50%1/2
shift() || (return 0)
l!l
50
MC/DC0%0/1
shift() || (return 0)
shift()
Truth table50%1/2
A
A= shift()
Aresult
11
00
63 5 my ($key, $value) = $string =~ /^#hugin_([[:alnum:]]+) *(.*)/g;
64 5 $self->{$key} = $value;
65 5 return 1;
66 }
67  
68 sub Assemble
69 7 ▶{
Subroutine Assemble: called CC=3 SCAR=11.3
Pod undocumented
70 7 my $self = shift;
71 7 my @items;
72 7 for my $entry (sort keys %{$self})
73 {
74 142 push @items, $self->Identifier . $entry .' '. $self->{$entry};
75 }
76 7 ▶ return (join "\n", @items) ."\n" if (@items);
Branch: 1 branch
BranchTrueFalseTotal
if @items 7 0 7
77 0 return '';
78 }
79  
80 sub Report
81 0 ▶{
Subroutine Report: not called CC=3 SCAR=24.8
Pod undocumented
82 0 my $self = shift;
83 0 my @report;
84 0 for my $entry (sort keys %{$self})
85 {
86 push @report, [$entry, $self->{$entry}]
87 0 ▶ unless ($self->{$entry} =~ /^(false)? *$/i);
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{$entry} =~ /^(false)? *$/i 0 0 0
88 }
89 0 [@report];
90 }
91  
92  
93 10 1;
« lib/Panotools/Makefile/Rule.pm ↑ Summary blib/lib/Panotools/Makefile.pm »