line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SOAP::WSDL::XSD::Typelib::Builtin::string; |
2
|
50
|
|
|
50
|
|
980
|
use strict; |
|
50
|
|
|
|
|
65
|
|
|
50
|
|
|
|
|
1338
|
|
3
|
50
|
|
|
50
|
|
180
|
use warnings; |
|
50
|
|
|
|
|
61
|
|
|
50
|
|
|
|
|
1142
|
|
4
|
50
|
|
|
50
|
|
1121
|
use Class::Std::Fast::Storable constructor => 'none', cache => 1; |
|
50
|
|
|
|
|
31716
|
|
|
50
|
|
|
|
|
1238
|
|
5
|
50
|
|
|
50
|
|
4824
|
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType); |
|
50
|
|
|
|
|
58
|
|
|
50
|
|
|
|
|
12839
|
|
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
|
563
|
$_[1] ||= {}; |
17
|
|
|
|
|
|
|
|
18
|
60
|
|
|
|
|
180
|
my $value = $_[0]->get_value(); |
19
|
|
|
|
|
|
|
|
20
|
60
|
100
|
|
|
|
226
|
return $_[0]->start_tag({ %{ $_[1] }, nil => 1}) |
|
2
|
|
|
|
|
11
|
|
21
|
|
|
|
|
|
|
if not defined $value; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# HTML::Entities does the same - and more, thus it's around 1/3 slower... |
24
|
58
|
|
|
|
|
115
|
$value =~ s{([&<>"'])}{$char2entity{$1}}xgmso; |
25
|
|
|
|
|
|
|
|
26
|
58
|
|
|
|
|
162
|
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
|
2376
|
return $_[0]->get_value(); |
34
|
50
|
|
|
50
|
|
253
|
} |
|
50
|
|
|
|
|
73
|
|
|
50
|
|
|
|
|
245
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Class::Std::initialize(); |
37
|
|
|
|
|
|
|
1; |