line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Ubic::Result; |
2
|
|
|
|
|
|
|
$Ubic::Result::VERSION = '1.58_01'; # TRIAL |
3
|
42
|
|
|
42
|
|
19114
|
use strict; |
|
42
|
|
|
|
|
44
|
|
|
42
|
|
|
|
|
1421
|
|
4
|
42
|
|
|
42
|
|
215
|
use warnings; |
|
42
|
|
|
|
|
46
|
|
|
42
|
|
|
|
|
1413
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: common return value for many ubic interfaces |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
42
|
|
|
42
|
|
15875
|
use Ubic::Result::Class; |
|
42
|
|
|
|
|
110
|
|
|
42
|
|
|
|
|
278
|
|
10
|
42
|
|
|
42
|
|
1888
|
use Scalar::Util qw(blessed); |
|
42
|
|
|
|
|
120
|
|
|
42
|
|
|
|
|
3658
|
|
11
|
42
|
|
|
42
|
|
295
|
use parent qw(Exporter); |
|
42
|
|
|
|
|
59
|
|
|
42
|
|
|
|
|
238
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
14
|
|
|
|
|
|
|
result |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
17
|
|
|
|
|
|
|
all => \@EXPORT_OK, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub result { |
21
|
419
|
|
|
419
|
1
|
1342
|
my ($str, $msg) = @_; |
22
|
419
|
100
|
66
|
|
|
3165
|
if (blessed $str and $str->isa('Ubic::Result::Class')) { |
23
|
206
|
|
|
|
|
743
|
return $str; |
24
|
|
|
|
|
|
|
} |
25
|
213
|
|
|
|
|
4572
|
return Ubic::Result::Class->new({ type => "$str", msg => $msg }); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |