line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SOAP::WSDL::Generator::PrefixResolver; |
2
|
2
|
|
|
2
|
|
14556
|
use strict; use warnings; |
|
2
|
|
|
2
|
|
3
|
|
|
2
|
|
|
|
|
60
|
|
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
48
|
|
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
384
|
use Class::Std::Fast::Storable; |
|
2
|
|
|
|
|
3544
|
|
|
2
|
|
|
|
|
11
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = 3.003; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my %namespace_prefix_map_of :ATTR(:name :default<{}>); |
9
|
|
|
|
|
|
|
my %namespace_map_of :ATTR(:name :default<{}>); |
10
|
|
|
|
|
|
|
my %prefix_of :ATTR(:name :default<{}>); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub resolve_prefix { |
13
|
0
|
|
|
0
|
1
|
|
my ($self, $type, $namespace, $element) = @_; |
14
|
0
|
|
|
|
|
|
my $prefix; |
15
|
0
|
0
|
|
|
|
|
if (not defined($namespace)) { |
16
|
0
|
|
|
|
|
|
$prefix = $prefix_of{ $$self }->{ $type } |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
else { |
19
|
0
|
|
0
|
|
|
|
$prefix = $namespace_prefix_map_of{ $$self }->{ $namespace } |
20
|
|
|
|
|
|
|
|| ( ($namespace_map_of{ $$self }->{ $namespace }) |
21
|
|
|
|
|
|
|
? join ('::', $prefix_of{ $$self }->{ $type }, $namespace_map_of{ $$self }->{ $namespace }) |
22
|
|
|
|
|
|
|
: $prefix_of{ $$self }->{ $type } |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
} |
25
|
0
|
|
|
|
|
|
return "${prefix}::"; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |