line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pod::Usage::Return; |
2
|
|
|
|
|
|
|
# ABSTRACT: pod2usage that returns instead of exits |
3
|
|
|
|
|
|
|
$Pod::Usage::Return::VERSION = '0.003'; |
4
|
2
|
|
|
2
|
|
89229
|
use strict; |
|
2
|
|
|
|
|
18
|
|
|
2
|
|
|
|
|
163
|
|
5
|
2
|
|
|
2
|
|
19
|
use warnings; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
158
|
|
6
|
2
|
|
|
2
|
|
3916
|
use Pod::Usage (); |
|
2
|
|
|
|
|
153530
|
|
|
2
|
|
|
|
|
65
|
|
7
|
2
|
|
|
2
|
|
25
|
use base 'Exporter'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
597
|
|
8
|
|
|
|
|
|
|
our @EXPORT = qw( pod2usage ); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub pod2usage { |
11
|
4
|
|
|
4
|
1
|
21368
|
my $exitval = 2; |
12
|
4
|
|
|
|
|
11
|
my %args; |
13
|
4
|
100
|
|
|
|
16
|
if ( @_ == 1 ) { |
14
|
3
|
100
|
|
|
|
25
|
if ( ref $_[0] eq 'HASH' ) { |
|
|
100
|
|
|
|
|
|
15
|
1
|
|
|
|
|
2
|
%args = %{$_[0]}; |
|
1
|
|
|
|
|
5
|
|
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
elsif ( $_[0] =~ /^\d+$/ ) { |
18
|
1
|
|
|
|
|
3
|
$exitval = $_[0]; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
else { |
21
|
1
|
|
|
|
|
5
|
$args{-message} = $_[0]; |
22
|
1
|
|
|
|
|
4
|
$args{-verbose} = 0; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
else { |
26
|
1
|
|
|
|
|
3
|
%args = @_; |
27
|
|
|
|
|
|
|
} |
28
|
4
|
|
|
|
|
17
|
$args{-exitval} = 'NOEXIT'; |
29
|
4
|
100
|
|
|
|
20
|
if ( $exitval >= 2 ) { |
30
|
3
|
|
|
|
|
12
|
$args{-output} = *STDERR; |
31
|
|
|
|
|
|
|
} |
32
|
4
|
|
|
|
|
23
|
Pod::Usage::pod2usage( \%args ); |
33
|
4
|
|
|
|
|
39365
|
return $exitval; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |