line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SOAP::WSDL::XSD::Typelib::Builtin::boolean; |
2
|
36
|
|
|
36
|
|
12656
|
use strict; |
|
36
|
|
|
|
|
35
|
|
|
36
|
|
|
|
|
880
|
|
3
|
36
|
|
|
36
|
|
120
|
use warnings; |
|
36
|
|
|
|
|
37
|
|
|
36
|
|
|
|
|
1129
|
|
4
|
36
|
|
|
36
|
|
539
|
use Class::Std::Fast::Storable constructor => 'none', cache => 1; |
|
36
|
|
|
|
|
15541
|
|
|
36
|
|
|
|
|
187
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = 3.003; |
7
|
|
|
|
|
|
|
|
8
|
36
|
|
|
36
|
|
3842
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType); |
|
36
|
|
|
|
|
44
|
|
|
36
|
|
|
|
|
5890
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub serialize { |
11
|
10
|
|
100
|
10
|
0
|
36
|
$_[1] ||= {}; |
12
|
10
|
|
|
|
|
20
|
my $value =$_[0]->get_value(); |
13
|
10
|
100
|
|
|
|
39
|
return $_[0]->start_tag({ %{$_[1]}, nil => 1}) |
|
1
|
|
|
|
|
5
|
|
14
|
|
|
|
|
|
|
if not defined $value; |
15
|
9
|
100
|
100
|
|
|
24
|
return join q{} |
16
|
|
|
|
|
|
|
, $_[0]->start_tag($_[1]) |
17
|
|
|
|
|
|
|
, $value && $value ne 'false' ? 'true' : 'false' |
18
|
|
|
|
|
|
|
, $_[0]->end_tag($_[1]); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub as_string :STRINGIFY { |
22
|
7
|
|
|
7
|
0
|
623
|
my $value = $_[0]->get_value(); |
23
|
7
|
100
|
|
|
|
39
|
return q{} if not defined $value; |
24
|
5
|
100
|
100
|
|
|
31
|
return ($value && $value ne 'false') ? 1 : 0; |
25
|
36
|
|
|
36
|
|
155
|
} |
|
36
|
|
|
|
|
42
|
|
|
36
|
|
|
|
|
150
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub as_num :NUMERIFY :BOOLIFY { |
28
|
10
|
|
|
10
|
0
|
162
|
my $value = $_[0]->get_value(); |
29
|
10
|
100
|
100
|
|
|
77
|
return ($value && $value ne 'false') ? 1 : 0; |
30
|
36
|
|
|
36
|
|
6395
|
} |
|
36
|
|
|
|
|
51
|
|
|
36
|
|
|
|
|
114
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub set_value { |
33
|
5
|
100
|
66
|
5
|
0
|
436
|
$_[0]->SUPER::set_value( defined $_[1] |
|
|
100
|
|
|
|
|
|
34
|
|
|
|
|
|
|
? ($_[1] ne 'false' && ($_[1]) ) |
35
|
|
|
|
|
|
|
? 1 : 0 |
36
|
|
|
|
|
|
|
: 0); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
1
|
|
|
1
|
0
|
5
|
sub delete_value { $_[0]->SUPER::set_value(undef) } |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Class::Std::Fast::initialize(); # make :BOOLIFY overloading serializable |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |