lib/Snig.pm

filter: Statementstmt 76.3% 29 / 38 Branchbran n/a Conditioncond 0.0% 0 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 77.7% 7 / 9 Podpod 0.0% 0 / 1 totaltotal 66.6% 36 / 54 CC 3 SCAR 14.1
CC
3
Cov
69%
run
12.0
__ANON__
2.0
BEGIN
1.0
CRAP 4.1
« lib/Snig/Collection.pm ↑ Summary script/snig.pl »
1 1 ▶use v5.40;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use feature 'class';
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶no warnings "experimental::class";
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 class Snig {
6 1 our $VERSION = '1.001'; # VERSION
7 # ABSTRACT: (Simple|Static|Small|S..) Image Gallery
8 # PODNAME: Snig
9  
10 1 ▶ use Log::Any qw($log);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶ use Path::Tiny qw(path);
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 ▶ use Snig::Collection;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶ use Snig::Image;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 1 field $name :reader :param;
17 1 field $th_size :reader :param = 200;
18 1 field $detail_size :reader :param = 1000;
19 1 field $sort_by :reader :param = 'created'; # TODO
20 1 field $input :reader :param;
21 1 field $output :reader :param;
22 1 field $force :reader :param;
23  
24 0 ▶ ADJUST {
Subroutine __ANON__: not called CC=1 SCAR=6.9
25 0 $input = path($input);
26 0 $output = path($output);
27 0 $output->mkdir;
28  
29 0 $force = { map { $_ => 1 } $force->@* };
30 }
31  
32 0 ▶ method run {
Subroutine run: not called CC=3 SCAR=24.8
Pod undocumented
33 0 my $collection = Snig::Collection->new(input => $input, sort_by => $sort_by, name => $name);
34 0 ▶ $collection->resize_images($output, $th_size, $detail_size, $force->{resize} || 0);
Condition0%0/2
$force->{'resize'} || 0
l!l
00
MC/DC0%0/1
$force->{'resize'} || 0
$force->{'resize'}
Truth table0%0/2
A
A= $force->{'resize'}
Aresult
11
00
35 0 $collection->write_html_pages($output);
36 0 ▶ $collection->write_index($output, $force->{zip} || 0);
Condition0%0/2
$force->{'zip'} || 0
l!l
00
MC/DC0%0/1
$force->{'zip'} || 0
$force->{'zip'}
Truth table0%0/2
A
A= $force->{'zip'}
Aresult
11
00
37 }
38 }
39  
40 __END__
« lib/Snig/Collection.pm ↑ Summary script/snig.pl »