line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType; |
2
|
82
|
|
|
82
|
|
899
|
use strict; |
|
82
|
|
|
|
|
93
|
|
|
82
|
|
|
|
|
2260
|
|
3
|
82
|
|
|
82
|
|
295
|
use warnings; |
|
82
|
|
|
|
|
95
|
|
|
82
|
|
|
|
|
2017
|
|
4
|
82
|
|
|
82
|
|
697
|
use Class::Std::Fast::Storable constructor => 'none', cache => 1; |
|
82
|
|
|
|
|
13274
|
|
|
82
|
|
|
|
|
396
|
|
5
|
82
|
|
|
82
|
|
24057
|
use SOAP::WSDL::XSD::Typelib::Builtin::anyType; |
|
82
|
|
|
|
|
143
|
|
|
82
|
|
|
|
|
1754
|
|
6
|
82
|
|
|
82
|
|
340
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anyType); |
|
82
|
|
|
|
|
127
|
|
|
82
|
|
|
|
|
19959
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my %value_of :ATTR(:get :init_arg :default<()>); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# don't you never dare to play with this ! |
11
|
|
|
|
|
|
|
our $___value = \%value_of; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
## use $_[n] for speed - we get called zillions of times... |
14
|
|
|
|
|
|
|
# and we don't need to return the last value... |
15
|
72
|
|
|
72
|
0
|
7588
|
sub set_value { $value_of{ ${ $_[0] } } = $_[1] } |
|
72
|
|
|
|
|
3206
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Default attribute handling |
18
|
|
|
|
|
|
|
# TODO add something for handling default attributes |
19
|
1
|
|
|
1
|
0
|
25
|
sub attr { |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# use $_[n] for speed. |
23
|
|
|
|
|
|
|
# This is less readable, but notably faster. |
24
|
|
|
|
|
|
|
# |
25
|
|
|
|
|
|
|
# use postfix-if for speed. This is slightly faster, as it saves |
26
|
|
|
|
|
|
|
# perl from creating a pad (variable context). |
27
|
|
|
|
|
|
|
# |
28
|
|
|
|
|
|
|
# The methods below may get called zillions of times, so |
29
|
|
|
|
|
|
|
# every little statement matters... |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub serialize { |
32
|
7
|
|
100
|
7
|
0
|
1319
|
$_[1] ||= {}; |
33
|
7
|
100
|
|
|
|
7
|
if (not defined $value_of{ ${$_[0]} }) { |
|
7
|
|
|
|
|
18
|
|
34
|
3
|
|
|
|
|
4
|
return $_[0]->start_tag({ %{ $_[1] }, nil => 1 }, undef); |
|
3
|
|
|
|
|
11
|
|
35
|
|
|
|
|
|
|
} |
36
|
4
|
|
|
|
|
9
|
return join q{} |
37
|
4
|
|
|
|
|
12
|
, $_[0]->start_tag($_[1], $value_of{ ${$_[0]} }) |
38
|
4
|
|
|
|
|
7
|
, $value_of{ ${$_[0]} } |
39
|
|
|
|
|
|
|
, $_[0]->end_tag($_[1]); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub as_string :STRINGIFY { |
43
|
91
|
100
|
|
91
|
0
|
30089
|
return defined($value_of { ${ $_[0] } }) ? $value_of { ${ $_[0] } } : q{}; |
|
91
|
|
|
|
|
300
|
|
|
89
|
|
|
|
|
542
|
|
44
|
82
|
|
|
82
|
|
398
|
} |
|
82
|
|
|
|
|
96
|
|
|
82
|
|
|
|
|
333
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub as_bool :BOOLIFY { |
47
|
15
|
|
|
15
|
0
|
699
|
return $value_of { ${ $_[0] } }; |
|
15
|
|
|
|
|
45
|
|
48
|
82
|
|
|
82
|
|
12804
|
} |
|
82
|
|
|
|
|
148
|
|
|
82
|
|
|
|
|
258
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
my $OBJECT_CACHE_REF = Class::Std::Fast::OBJECT_CACHE_REF(); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub new { |
53
|
200
|
|
|
200
|
0
|
54068
|
my $self = pop @{ $OBJECT_CACHE_REF->{ $_[0] } }; |
|
200
|
|
|
|
|
619
|
|
54
|
200
|
100
|
|
|
|
667
|
$self = bless \(my $o = Class::Std::Fast::ID()), $_[0] |
55
|
|
|
|
|
|
|
if not defined $self; |
56
|
|
|
|
|
|
|
$value_of{ $$self } = $_[1]->{ value } |
57
|
200
|
100
|
100
|
|
|
5816
|
if (($#_) && exists $_[1]->{ value }); |
58
|
200
|
|
|
|
|
492
|
return $self; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Class::Std::initialize(); # make :BOOLIFY overloading serializable |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |