| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package App::bif::show::version; |
|
2
|
1
|
|
|
1
|
|
1973
|
use strict; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
25
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
32
|
|
|
4
|
1
|
|
|
1
|
|
499
|
use App::bif::Build; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
27
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use Bif::Mo; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
7
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use Config; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
38
|
|
|
7
|
1
|
|
|
1
|
|
4
|
use Path::Tiny; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
436
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.1.5_6'; |
|
10
|
|
|
|
|
|
|
extends 'App::bif'; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub run { |
|
13
|
1
|
|
|
1
|
1
|
2
|
my $self = shift; |
|
14
|
1
|
|
|
|
|
5
|
my $opts = $self->opts; |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# Taken directly from perlvar(1) |
|
17
|
1
|
|
|
|
|
3
|
my $this_perl = $^X; |
|
18
|
1
|
50
|
|
|
|
5
|
if ( $^O ne 'VMS' ) { |
|
19
|
|
|
|
|
|
|
$this_perl .= $Config{_exe} |
|
20
|
1
|
50
|
|
|
|
57
|
unless $this_perl =~ m/$Config{_exe}$/i; |
|
21
|
|
|
|
|
|
|
} |
|
22
|
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
9
|
my ( $bold, $reset ) = $self->colours( 'bold', 'reset' ); |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my @data = ( |
|
26
|
|
|
|
|
|
|
[ $bold . 'Host' . $reset, '' ], |
|
27
|
|
|
|
|
|
|
[ 'archname:', $Config{archname} ], |
|
28
|
|
|
|
|
|
|
[ 'osname:', $Config{osname} ], |
|
29
|
|
|
|
|
|
|
[ |
|
30
|
|
|
|
|
|
|
'perl:', |
|
31
|
|
|
|
|
|
|
sprintf( '%s (%d.%d.%d)', |
|
32
|
|
|
|
|
|
|
$this_perl, $Config{api_revision}, |
|
33
|
|
|
|
|
|
|
$Config{api_version}, $Config{api_subversion} ) |
|
34
|
1
|
|
|
|
|
127
|
], |
|
35
|
|
|
|
|
|
|
[ '-', '' ], |
|
36
|
|
|
|
|
|
|
[ $bold . 'Software' . $reset, '' ], |
|
37
|
|
|
|
|
|
|
[ 'built:', $App::bif::Build::DATE ], |
|
38
|
|
|
|
|
|
|
[ 'commit:', $App::bif::Build::COMMIT ], |
|
39
|
|
|
|
|
|
|
[ 'version:', $App::bif::Build::VERSION ], |
|
40
|
|
|
|
|
|
|
[ '-', '' ], |
|
41
|
|
|
|
|
|
|
[ $bold . 'Installation' . $reset, '' ], |
|
42
|
|
|
|
|
|
|
[ 'bin:', path($0)->absolute ] |
|
43
|
|
|
|
|
|
|
); |
|
44
|
|
|
|
|
|
|
|
|
45
|
1
|
50
|
|
|
|
141
|
push( @data, [ 'lib:', path($App::bif::Build::FILE)->parent(3) ] ) |
|
46
|
|
|
|
|
|
|
unless defined &static::find; |
|
47
|
|
|
|
|
|
|
|
|
48
|
1
|
|
|
|
|
156
|
my $repo = eval { $self->repo }; |
|
|
1
|
|
|
|
|
7
|
|
|
49
|
1
|
|
|
|
|
3
|
my $user_repo = eval { $self->user_repo }; |
|
|
1
|
|
|
|
|
14
|
|
|
50
|
|
|
|
|
|
|
|
|
51
|
1
|
50
|
33
|
|
|
9
|
if ( $repo or $user_repo ) { |
|
52
|
0
|
0
|
|
|
|
0
|
push( @data, |
|
|
|
0
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
[ '-', '' ], |
|
54
|
|
|
|
|
|
|
[ $bold . 'Repositories' . $reset, '' ], |
|
55
|
|
|
|
|
|
|
[ 'current:', $repo ? $repo : '(not found)' ], |
|
56
|
|
|
|
|
|
|
[ 'user:', $user_repo ? $user_repo : '(not found)' ], |
|
57
|
|
|
|
|
|
|
); |
|
58
|
|
|
|
|
|
|
} |
|
59
|
|
|
|
|
|
|
|
|
60
|
1
|
|
|
|
|
9
|
print $self->render_table( ' l l ', undef, \@data ); |
|
61
|
|
|
|
|
|
|
|
|
62
|
1
|
|
|
|
|
2357
|
return $self->ok('ShowVersion'); |
|
63
|
|
|
|
|
|
|
} |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |
|
66
|
|
|
|
|
|
|
__END__ |