blib/lib/Tapper/Reports/Web/Controller/Tapper/Preconditions/Id.pm

filter: Statementstmt 65.2% 15 / 23 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 63.3% 19 / 30 CC 2 SCAR 9.8
CC
2
Cov
60%
index
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« blib/script/tapper_reports_web_fastcgi_public.pl ↑ Summary blib/lib/Tapper/Reports/Web/Role/BehaviourModifications/Path.pm »
1 package Tapper::Reports::Web::Controller::Tapper::Preconditions::Id;
2 13 our $AUTHORITY = 'cpan:TAPPER';
3 13 $Tapper::Reports::Web::Controller::Tapper::Preconditions::Id::VERSION = '5.0.17';
4 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 13 ▶use parent 'Tapper::Reports::Web::Controller::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 0 ▶sub index :Path :Args(1)
Subroutine index: not called CC=2 SCAR=17.9
10 {
11 0 my ( $self, $c, $id ) = @_;
12  
13 0 my $precond_search = $c->model('TestrunDB')->resultset('Precondition')->find($id);
14 0 ▶ if (not $precond_search) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($precond_search) 0 0 0
15 0 $c->response->body(qq(No precondition with id "$id" found in the database!));
16 0 return;
17 }
18 0 $c->stash->{precondition} = $precond_search->precondition_as_hash;
19 0 $c->stash->{precondition}{id} = $precond_search->id;
20 0 return;
21 13 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 13 1;
24  
25 __END__
« blib/script/tapper_reports_web_fastcgi_public.pl ↑ Summary blib/lib/Tapper/Reports/Web/Role/BehaviourModifications/Path.pm »