| 1 | package App::Prove::Plugin::CumulativeTimer; | ||||||||||||||||||||
| 2 | 2 | ▶ | use 5.008001; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 2 | our $VERSION = "0.02"; | |||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 2 | ▶ | use Class::Method::Modifiers qw( around ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | 2 | ▶ | use TAP::Parser; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | 2 | ▶ | use TAP::Formatter::Session; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | 1 | ▶ | sub load { | ||||||||||||||||||
|
Subroutine
load: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 13 | 1 | my ( $class, $p ) = @_; | |||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 1 | $p->{app_prove}->timer(1); | |||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 1 | my $first_start_time; | |||||||||||||||||||
| 18 | my $first_start_times; | ||||||||||||||||||||
| 19 | 2 | ▶ | around 'TAP::Formatter::Session::time_report' => sub { | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.0
| |||||||||||||||||||||
| 20 | 2 | my $orig = shift; | |||||||||||||||||||
| 21 | 2 | my ( $self, $formatter, $parser ) = @_; | |||||||||||||||||||
| 22 | 2 | ▶ | $first_start_time ||= $parser->start_time; | ||||||||||||||||||
|
Condition66%2/3
$first_start_time ||= $parser->start_time
MC/DC0%0/2
$first_start_time ||= $parser->start_time
$first_start_time
$parser->start_time
Truth table66%2/3
A ||= B
A= $first_start_timeB= $parser->start_time
| |||||||||||||||||||||
| 23 | 2 | ▶ | $first_start_times ||= $parser->start_times; | ||||||||||||||||||
|
Condition66%2/3
$first_start_times ||= $parser->start_times
MC/DC0%0/2
$first_start_times ||= $parser->start_times
$first_start_times
$parser->start_times
Truth table66%2/3
A ||= B
A= $first_start_timesB= $parser->start_times
| |||||||||||||||||||||
| 24 | 2 | ▶ | no warnings 'redefine'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 25 | 2 | ▶ | local *TAP::Parser::start_time = sub {$first_start_time}; | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 26 | 2 | ▶ | local *TAP::Parser::start_times = sub {$first_start_times}; | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 27 | 2 | return $orig->(@_); | |||||||||||||||||||
| 28 | 1 | }; | |||||||||||||||||||
| 29 | } | ||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | 2 | 1; | |||||||||||||||||||
| 32 | __END__ | ||||||||||||||||||||