« blib/lib/Tapper/Reports/Web/Controller/Tapper/Testruns.pm
↑ Summary
blib/lib/Tapper/Reports/Web/Util/Filter/Report.pm »
| 1 | package Tapper::Reports::Web::Controller::Tapper::Reports::Tap; | ||||||||||||||||||||||||||||
| 2 | 13 | our $AUTHORITY = 'cpan:TAPPER'; | |||||||||||||||||||||||||||
| 3 | 13 | $Tapper::Reports::Web::Controller::Tapper::Reports::Tap::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=5 SCAR=34.0
| |||||||||||||||||||||||||||||
| 10 | { | ||||||||||||||||||||||||||||
| 11 | 0 | my ( $self, $c, $report_id ) = @_; | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 0 | my $report = $c->model('TestrunDB')->resultset('Report')->find($report_id); | |||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | 0 | ▶ | if ($report) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 16 | 0 | ▶ | if ($report->tap && $report->tap->tap_is_archive) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$report->tap and $report->tap->tap_is_archive
MC/DC0%0/2
$report->tap and $report->tap->tap_is_archive
$report->tap
$report->tap->tap_is_archive
Truth table0%0/3
A and B
A= $report->tapB= $report->tap->tap_is_archive
| |||||||||||||||||||||||||||||
| 17 | 0 | $c->response->content_type ('application/x-compressed'); | |||||||||||||||||||||||||||
| 18 | 0 | $c->response->header ("Content-Disposition" => 'inline; filename="tap-'.$report_id.'.tgz"'); | |||||||||||||||||||||||||||
| 19 | } else { | ||||||||||||||||||||||||||||
| 20 | 0 | $c->response->content_type ('text/plain'); | |||||||||||||||||||||||||||
| 21 | 0 | $c->response->header ("Content-Disposition" => 'inline; filename="tap-'.$report_id.'.tap"'); | |||||||||||||||||||||||||||
| 22 | } | ||||||||||||||||||||||||||||
| 23 | 0 | ▶ | $c->response->body ($report->tap ? $report->tap->tap : "Error: No TAP for report $report_id."); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 24 | } else { | ||||||||||||||||||||||||||||
| 25 | 0 | $c->response->content_type ("text/plain"); | |||||||||||||||||||||||||||
| 26 | 0 | $c->response->header ("Content-Disposition" => 'inline; filename="nonexistent.report.tap.'.$report_id.'"'); | |||||||||||||||||||||||||||
| 27 | 0 | $c->response->body ("Error: No report $report_id."); | |||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||
| 29 | 13 | ▶ | } | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | 13 | 1; | |||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | __END__ | ||||||||||||||||||||||||||||