line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
11
|
|
|
11
|
|
228706
|
use 5.014; |
|
11
|
|
|
|
|
48
|
|
2
|
11
|
|
|
11
|
|
79
|
use strict; |
|
11
|
|
|
|
|
42
|
|
|
11
|
|
|
|
|
259
|
|
3
|
11
|
|
|
11
|
|
73
|
use warnings; |
|
11
|
|
|
|
|
28
|
|
|
11
|
|
|
|
|
307
|
|
4
|
|
|
|
|
|
|
|
5
|
11
|
|
|
11
|
|
544
|
use Result::Trait (); |
|
11
|
|
|
|
|
39
|
|
|
11
|
|
|
|
|
662
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package Result::OkList; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
10
|
|
|
|
|
|
|
our $VERSION = '0.006'; |
11
|
|
|
|
|
|
|
|
12
|
11
|
|
|
11
|
|
5011
|
use parent qw( Result::Ok ); |
|
11
|
|
|
|
|
3257
|
|
|
11
|
|
|
|
|
92
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
'overload'->import( 'Result::Trait'->__OVERLOAD_ARGS__( 'ok_list', '_peek' ) ); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub unwrap { |
17
|
12
|
|
|
12
|
0
|
1729
|
my ( $self ) = @_; |
18
|
12
|
100
|
66
|
|
|
369
|
@_ == 1 && wantarray |
19
|
|
|
|
|
|
|
or Carp::croak( 'Usage: $result->unwrap() in list context' ); |
20
|
|
|
|
|
|
|
|
21
|
10
|
|
|
|
|
112
|
$self->[0] = !!1; |
22
|
|
|
|
|
|
|
|
23
|
10
|
|
|
|
|
18
|
@{ $self->[1] }; |
|
10
|
|
|
|
|
340
|
|
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |