Skip to content

Commit

Permalink
Remove is_utf8(), add consistent versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
redhotpenguin committed Dec 19, 2017
1 parent 28ade94 commit 6a61354
Show file tree
Hide file tree
Showing 23 changed files with 47 additions and 22 deletions.
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ http://rt.cpan.org/Public/Dist/Display.html?Name=SOAP-Lite
THIS RELEASE
-----------------------------------------------------------------------

1.24 December 19, 2017
+ Consistent Versioning https://github.com/redhotpenguin/soaplite/pull/24
! Remove is_utf8() check from 78588

1.23 December 18, 2017
! RT #78588 unicode data not correct encoded

Expand Down
3 changes: 3 additions & 0 deletions bin/SOAPsh.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko --

use strict;

# VERSION

use SOAP::Lite;
use Data::Dumper; $Data::Dumper::Terse = 1; $Data::Dumper::Indent = 1;

Expand Down
2 changes: 2 additions & 0 deletions bin/stubmaker.pl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# stubmaker.pl -[vd] <WSDL URL>
###################################################

# VERSION

use SOAP::Lite;
use Getopt::Long;

Expand Down
4 changes: 3 additions & 1 deletion dist.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = SOAP-Lite
version = 1.23
version = 1.24
author = Pavel Kulchenko
author = Randy J Ray
author = Byrne Reese
Expand All @@ -21,6 +21,8 @@ exclude_filename = Makefile.PL

[License]

[OurPkgVersion]

[ExecDir]
dir = bin

Expand Down
2 changes: 1 addition & 1 deletion lib/Apache/SOAP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use vars qw(@ISA $VERSION);
use SOAP::Transport::HTTP;

@ISA = qw(SOAP::Transport::HTTP::Apache);
our $VERSION = 1.17;
# VERSION

my $server = __PACKAGE__->new;

Expand Down
2 changes: 1 addition & 1 deletion lib/SOAP/Constants.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package SOAP::Constants;
use strict;
use SOAP::Lite;

our $VERSION = 1.17;
# VERSION

use constant URI_1999_SCHEMA_XSD => "http://www.w3.org/1999/XMLSchema";
use constant URI_1999_SCHEMA_XSI => "http://www.w3.org/1999/XMLSchema-instance";
Expand Down
6 changes: 3 additions & 3 deletions lib/SOAP/Lite.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package SOAP::Lite;
use strict;
use warnings;

our $VERSION = '1.23';
# VERSION

package SOAP::XMLSchemaApacheSOAP::Deserializer;

Expand Down Expand Up @@ -806,7 +806,7 @@ sub new {
} => $class;
$self->typelookup({
'base64Binary' =>
[10, sub {!utf8::is_utf8($_[0]) && $_[0] =~ /[^\x09\x0a\x0d\x20-\x7f]/ }, 'as_base64Binary'],
[10, sub { $_[0] =~ /[^\x09\x0a\x0d\x20-\x7f]/ }, 'as_base64Binary'],
'zerostring' =>
[12, sub { $_[0] =~ /^0\d+$/ }, 'as_string'],
# int (and actually long too) are subtle: the negative range is one greater...
Expand Down Expand Up @@ -2480,7 +2480,7 @@ package SOAP::Client;

use SOAP::Lite::Utils;

$VERSION = $SOAP::Lite::VERSION;
# VERSION
sub BEGIN {
__PACKAGE__->__mk_accessors(qw(endpoint code message
is_success status options));
Expand Down
2 changes: 2 additions & 0 deletions lib/SOAP/Lite/Deserializer/XMLSchema1999.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package SOAP::Lite::Deserializer::XMLSchema1999;
use strict;

# VERSION

use SOAP::Lite::Deserializer::XMLSchemaSOAP1_1;

sub anyTypeValue { 'ur-type' }
Expand Down
3 changes: 3 additions & 0 deletions lib/SOAP/Lite/Deserializer/XMLSchema2001.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package SOAP::Lite::Deserializer::XMLSchema2001;

use strict;

# VERSION

use SOAP::Lite::Deserializer::XMLSchema1999;
use SOAP::Lite::Deserializer::XMLSchemaSOAP1_1;
use SOAP::Lite::Deserializer::XMLSchemaSOAP1_2;
Expand Down
2 changes: 2 additions & 0 deletions lib/SOAP/Lite/Deserializer/XMLSchemaSOAP1_1.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package SOAP::Lite::Deserializer::XMLSchemaSOAP1_1;
use strict;

# VERSION

sub anyTypeValue { 'ur-type' }

sub as_boolean {
Expand Down
3 changes: 3 additions & 0 deletions lib/SOAP/Lite/Deserializer/XMLSchemaSOAP1_2.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package SOAP::Lite::Deserializer::XMLSchemaSOAP1_2;
use strict;

# VERSION

use SOAP::Lite::Deserializer::XMLSchemaSOAP1_1;

sub anyTypeValue { 'anyType' }
Expand Down
3 changes: 3 additions & 0 deletions lib/SOAP/Lite/Packager.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
package SOAP::Lite::Packager;

use strict;

# VERSION

use vars;

use vars qw($SUPPORTED_TYPES);
Expand Down
2 changes: 2 additions & 0 deletions lib/SOAP/Lite/Utils.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package SOAP::Lite::Utils;
use strict;

# VERSION

sub import {
my $caller = caller();
no strict qw(refs);
Expand Down
2 changes: 1 addition & 1 deletion lib/SOAP/Packager.pm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ package SOAP::Packager;
use strict;
use vars;

our $VERSION = 1.17;
# VERSION
our $SUPPORTED_TYPES = { };

sub BEGIN {
Expand Down
2 changes: 1 addition & 1 deletion lib/SOAP/Test.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
package SOAP::Test;

use 5.006;
our $VERSION = 1.17;
# VERSION

our $TIMEOUT = 5;

Expand Down
2 changes: 1 addition & 1 deletion lib/SOAP/Transport/HTTP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package SOAP::Transport::HTTP;

use strict;

our $VERSION = 1.17;
# VERSION

use SOAP::Lite;
use SOAP::Packager;
Expand Down
2 changes: 1 addition & 1 deletion lib/SOAP/Transport/IO.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package SOAP::Transport::IO;

use strict;

our $VERSION = 1.17;
# VERSION

use IO::File;
use SOAP::Lite;
Expand Down
3 changes: 1 addition & 2 deletions lib/SOAP/Transport/LOCAL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ package SOAP::Transport::LOCAL;

use strict;


our $VERSION = 1.17;
# VERSION

# ======================================================================

Expand Down
2 changes: 2 additions & 0 deletions lib/SOAP/Transport/LOOPBACK.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ use strict;
package SOAP::Transport::LOOPBACK::Client;
use strict;

# VERSION

use vars qw(@ISA);
use SOAP::Lite;
@ISA = qw(SOAP::Client);
Expand Down
3 changes: 1 addition & 2 deletions lib/SOAP/Transport/MAILTO.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ package SOAP::Transport::MAILTO;

use strict;


our $VERSION = 1.17;
# VERSION

use MIME::Lite;
use URI;
Expand Down
2 changes: 1 addition & 1 deletion lib/SOAP/Transport/POP3.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package SOAP::Transport::POP3;

use strict;

our $VERSION = 1.17;
# VERSION

use Net::POP3;
use URI;
Expand Down
2 changes: 1 addition & 1 deletion lib/SOAP/Transport/TCP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package SOAP::Transport::TCP;

use strict;

our $VERSION = 1.17;
# VERSION

use URI;
use IO::Socket;
Expand Down
11 changes: 5 additions & 6 deletions t/010-serializer.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ my @types2001 = qw(
);

# types * 3 + extra tests + autotype tests
plan tests => 228;
plan tests => 227;

test_serializer('SOAP::XMLSchema1999::Serializer', @types1999);
test_serializer('SOAP::XMLSchema2001::Serializer', @types2001);
Expand Down Expand Up @@ -144,10 +144,9 @@ while (my ($value, $type) = each %type_of) {
print "# $value => $type (result: $result->[1]->{'xsi:type'})\n";
ok ( $result->[1]->{'xsi:type'} eq $type );
}

#separate test to test for utf-8 flag and avoid "wide character in print"
use Data::Dumper;
my $unicode_string = "t\N{U+019C}t"; #LATIN CAPITAL LETTER TURNED M
ok(utf8::is_utf8($unicode_string) == 1);
my $result = $serializer->encode_scalar($unicode_string, 'test', undef, {});
print "# unicode_string => xsd:string (result: $result->[1]->{'xsi:type'})\n";
ok($result->[1]->{'xsi:type'} eq 'xsd:string');
#die "result is " . Dumper($result->[1]);
print "# unicode_string => xsd:base64Binary (result: $result->[1]->{'xsi:type'})\n";
ok($result->[1]->{'xsi:type'} eq 'xsd:base64Binary');

0 comments on commit 6a61354

Please sign in to comment.