« 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
| |||||||||||
| 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__ | ||||||||||