/usr/share/perl5/SOAP/WSDL/Part.pm is in libsoap-wsdl-perl 3.003-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | package SOAP::WSDL::Part;
use strict;
use warnings;
use Carp qw(croak);
use Class::Std::Fast::Storable;
use base qw(SOAP::WSDL::Base);
our $VERSION = 3.003;
my %element_of :ATTR(:name<element> :default<()>);
my %type_of :ATTR(:name<type> :default<()>);
sub serialize
{
my $self = shift;
my $name = shift;
my $data = shift;
my $opt = shift;
my $typelib = $opt->{ typelib } || die "No typelib";
my %ns_map = %{ $opt->{ namespace } };
my $item_name;
if ($item_name = $self->get_type() ) {
# resolve type
my ($prefix, $localname) = split /:/ , $item_name, 2;
my $type = $typelib->find_type( $ns_map{ $prefix }, $localname)
or die "type $item_name , $ns_map{ $prefix } not found";
my $name = $self->get_name();
return $type->serialize( $name, $data->{ $name }, $opt );
}
elsif ( $item_name = $self->get_element() ) {
my ($prefix, $localname) = split /:/ , $item_name, 2;
my $element = $typelib->find_element(
$ns_map{ $prefix },
$localname
)
or die "element $item_name , $ns_map{ $prefix } not found";
$opt->{ qualify } = 1;
return $element->serialize( undef, $data->{ $element->get_name() }, $opt );
}
die "Neither type nor element - don't know what to do";
}
1;
|