| 1 | package Local::Test; | ||||||||||
| 2 | |||||||||||
| 3 | 4 | ▶ | use 5.006; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 4 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 4 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 4 | our $VERSION = '0.001'; | |||||||||
| 8 | |||||||||||
| 9 | 4 | ▶ | use parent 'XT::Files::Plugin'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | sub BUILD { | ||||||||||
| 12 | 8 | ▶ | my ( $self, $args ) = @_; | ||||||||
|
Subroutine
BUILD: called CC=6 SCAR=19.0
Pod
undocumented
| |||||||||||
| 13 | |||||||||||
| 14 | 8 | my $report_file = $ENV{REPORT_FILE_BASE}; | |||||||||
| 15 | 8 | ▶ | die 'Environment variable REPORT_FILE not set' if !defined $report_file; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | 8 | $report_file .= '.new'; | |||||||||
| 17 | |||||||||||
| 18 | 8 | ▶ | open my $fh, '>', $report_file or die "Unable to write file $report_file: $!"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | ARG: | ||||||||||
| 20 | 8 | for my $key ( sort keys %{$args} ) { | |||||||||
| 21 | 8 | ▶ | next ARG if $key eq 'xtf'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | 0 | print $fh "$key=$args->{$key}\n"; | |||||||||
| 23 | } | ||||||||||
| 24 | 8 | ▶ | close $fh or die "Unable to write file $report_file: $!"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | |||||||||||
| 26 | 8 | return $self; | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | sub run { | ||||||||||
| 30 | 8 | ▶ | my ( $self, $args ) = @_; | ||||||||
|
Subroutine
run: called CC=5 SCAR=16.3
Pod
undocumented
| |||||||||||
| 31 | |||||||||||
| 32 | 8 | my $report_file = $ENV{REPORT_FILE_BASE}; | |||||||||
| 33 | 8 | ▶ | die 'Environment variable REPORT_FILE not set' if !defined $report_file; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | 8 | $report_file .= '.run'; | |||||||||
| 35 | |||||||||||
| 36 | 8 | ▶ | open my $fh, '>', $report_file or die "Unable to write file $report_file: $!"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 37 | 8 | for my $arg ( @{$args} ) { | |||||||||
| 38 | 21 | my ( $key, $value ) = @{$arg}; | |||||||||
| 39 | 21 | print $fh "$key=$value\n"; | |||||||||
| 40 | } | ||||||||||
| 41 | 8 | ▶ | close $fh or die "Unable to write file $report_file: $!"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 42 | |||||||||||
| 43 | 8 | return; | |||||||||
| 44 | } | ||||||||||
| 45 | |||||||||||
| 46 | 4 | 1; | |||||||||
| 47 | |||||||||||
| 48 | # vim: ts=4 sts=4 sw=4 et: syntax=perl | ||||||||||