line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SOAP::WSDL::XSD::Typelib::Builtin::string; |
2
|
52
|
|
|
52
|
|
1244
|
use strict; |
|
52
|
|
|
|
|
103
|
|
|
52
|
|
|
|
|
1652
|
|
3
|
52
|
|
|
52
|
|
282
|
use warnings; |
|
52
|
|
|
|
|
100
|
|
|
52
|
|
|
|
|
1514
|
|
4
|
52
|
|
|
52
|
|
2227
|
use Class::Std::Fast::Storable constructor => 'none', cache => 1; |
|
52
|
|
|
|
|
72913
|
|
|
52
|
|
|
|
|
1983
|
|
5
|
52
|
|
|
52
|
|
7398
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType); |
|
52
|
|
|
|
|
109
|
|
|
52
|
|
|
|
|
23613
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
my %char2entity = ( |
8
|
|
|
|
|
|
|
q{&} => q{&}, |
9
|
|
|
|
|
|
|
q{<} => q{<}, |
10
|
|
|
|
|
|
|
q{>} => q{>}, |
11
|
|
|
|
|
|
|
q{"} => q{"}, |
12
|
|
|
|
|
|
|
q{'} => q{'}, |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub serialize { |
16
|
60
|
|
100
|
60
|
0
|
1152
|
$_[1] ||= {}; |
17
|
|
|
|
|
|
|
|
18
|
60
|
|
|
|
|
271
|
my $value = $_[0]->get_value(); |
19
|
|
|
|
|
|
|
|
20
|
60
|
100
|
|
|
|
346
|
return $_[0]->start_tag({ %{ $_[1] }, nil => 1}) |
|
2
|
|
|
|
|
16
|
|
21
|
|
|
|
|
|
|
if not defined $value; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# HTML::Entities does the same - and more, thus it's around 1/3 slower... |
24
|
58
|
|
|
|
|
161
|
$value =~ s{([&<>"'])}{$char2entity{$1}}xgmso; |
25
|
|
|
|
|
|
|
|
26
|
58
|
|
|
|
|
232
|
return join q{}, $_[0]->start_tag($_[1], $value) |
27
|
|
|
|
|
|
|
#, encode_entities( $value, q{&<>"'} ) |
28
|
|
|
|
|
|
|
, $value |
29
|
|
|
|
|
|
|
, $_[0]->end_tag($_[1]); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub as_bool :BOOLIFY { |
33
|
15
|
|
|
15
|
0
|
3195
|
return $_[0]->get_value(); |
34
|
52
|
|
|
52
|
|
374
|
} |
|
52
|
|
|
|
|
99
|
|
|
52
|
|
|
|
|
444
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Class::Std::initialize(); |
37
|
|
|
|
|
|
|
1; |