line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*- |
2
|
|
|
|
|
|
|
# vim: ts=4 sts=4 sw=4: |
3
|
|
|
|
|
|
|
package CPAN::Distrostatus; |
4
|
12
|
|
|
|
|
109
|
use overload '""' => "as_string", |
5
|
12
|
|
|
12
|
|
4034
|
fallback => 1; |
|
12
|
|
|
|
|
3073
|
|
6
|
12
|
|
|
12
|
|
906
|
use vars qw($something_has_failed_at); |
|
12
|
|
|
|
|
22
|
|
|
12
|
|
|
|
|
1159
|
|
7
|
12
|
|
|
|
|
2192
|
use vars qw( |
8
|
|
|
|
|
|
|
$VERSION |
9
|
12
|
|
|
12
|
|
50
|
); |
|
12
|
|
|
|
|
17
|
|
10
|
|
|
|
|
|
|
$VERSION = "5.5"; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
0
|
|
|
0
|
0
|
|
my($class,$arg) = @_; |
15
|
0
|
|
|
|
|
|
my $failed = substr($arg,0,2) eq "NO"; |
16
|
0
|
0
|
|
|
|
|
if ($failed) { |
17
|
0
|
|
|
|
|
|
$something_has_failed_at = $CPAN::CurrentCommandId; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
bless { |
20
|
0
|
|
|
|
|
|
TEXT => $arg, |
21
|
|
|
|
|
|
|
FAILED => $failed, |
22
|
|
|
|
|
|
|
COMMANDID => $CPAN::CurrentCommandId, |
23
|
|
|
|
|
|
|
TIME => time, |
24
|
|
|
|
|
|
|
}, $class; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
sub something_has_just_failed () { |
27
|
0
|
0
|
|
0
|
0
|
|
defined $something_has_failed_at && |
28
|
|
|
|
|
|
|
$something_has_failed_at == $CPAN::CurrentCommandId; |
29
|
|
|
|
|
|
|
} |
30
|
0
|
|
|
0
|
0
|
|
sub commandid { shift->{COMMANDID} } |
31
|
0
|
|
|
0
|
0
|
|
sub failed { shift->{FAILED} } |
32
|
|
|
|
|
|
|
sub text { |
33
|
0
|
|
|
0
|
0
|
|
my($self,$set) = @_; |
34
|
0
|
0
|
|
|
|
|
if (defined $set) { |
35
|
0
|
|
|
|
|
|
$self->{TEXT} = $set; |
36
|
|
|
|
|
|
|
} |
37
|
0
|
|
|
|
|
|
$self->{TEXT}; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
sub as_string { |
40
|
0
|
|
|
0
|
0
|
|
my($self) = @_; |
41
|
0
|
|
|
|
|
|
$self->text; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |