import SOAP-WSDL 2.00_14 from CPAN

git-cpan-module:   SOAP-WSDL
git-cpan-version:  2.00_14
git-cpan-authorid: MKUTTER
git-cpan-file:     authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00_14.tar.gz
This commit is contained in:
Martin Kutter authored and Michael G. Schwern committed 2009-12-12 19:47:53 -08:00
1 parent f63138fc87
commit 099c83b6bc
21 files changed
+488 -131

No files matched your search

@@ -13,15 +13,23 @@ my %value_of :ATTR(:get<value> :init_arg<value> :default<()>);
# and we don't need to return the last value...
sub set_value { $value_of{ ident $_[0] } = $_[1] }
# use $_[n] for speed.
# This is less readable, but notably faster.
#
# use postfix-if for speed. This is slightly faster, as it saves
# perl from creating a pad (variable context).
#
# The methods below may get called zillions of times, so
# every little statement matters...
sub serialize {
my ($self, $opt) = @_;
my $ident = ident $self;
$opt ||= {};
return $self->start_tag({ %$opt, nil => 1})
if not defined $value_of{ $ident };
return join q{}, $self->start_tag($opt, $value_of{ $ident })
no warnings qw(uninitialized);
my $ident = ident $_[0];
$_[1]->{ nil } = 1 if not defined $value_of{ $ident };
return join q{}
, $_[0]->start_tag($_[1], $value_of{ $ident })
, $value_of{ $ident }
, $self->end_tag($opt);
, $_[0]->end_tag($_[1]);
}
# TODO disallow serializing !
+5 -1
View File
@@ -3,7 +3,9 @@ use strict;
use warnings;
use Class::Std::Storable;
my %xmlns_of :ATTR(:name<xmlns> :default<()>);
my %xmlns_of :ATTR(:get<xmlns> :init_arg<xmlns> :default<()>);
sub set_xmlns { $xmlns_of{ ident $_[0] } = $_[1] };
# use $_[1] for performance
sub start_tag {
@@ -19,6 +21,8 @@ sub end_tag {
: q{};
};
sub serialize { q{} };
sub serialize_qualified :STRINGIFY {
return $_[0]->serialize( { qualified => 1 } );
}