Skip to content

Commit

Permalink
removed sub before BEGIN
Browse files Browse the repository at this point in the history
perldoc perlmod:
... blocks can be prefixed with "sub" to give the appearance of a
    subroutine (although this is not considered good style).
  • Loading branch information
dumildekdu authored and redhotpenguin committed Oct 30, 2019
1 parent ddf4861 commit 5882f97
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
20 changes: 10 additions & 10 deletions lib/SOAP/Lite.pm
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ sub stringify {
return join ': ', $self->faultcode, $self->faultstring;
}

sub BEGIN {
BEGIN {
no strict 'refs';
for my $method (qw(faultcode faultstring faultactor faultdetail)) {
my $field = '_' . $method;
Expand Down Expand Up @@ -756,7 +756,7 @@ BEGIN {
sub prefix { $prefix =~ s/^[^\-]+-/$_[1]-/; $_[0]; }
}

sub BEGIN {
BEGIN {
no strict 'refs';

__PACKAGE__->__mk_accessors(qw(readable level seen autotype attr maptype
Expand Down Expand Up @@ -1840,7 +1840,7 @@ package SOAP::SOM;
use Carp ();
use SOAP::Lite::Utils;

sub BEGIN {
BEGIN {
no strict 'refs';
my %path = (
root => '/',
Expand Down Expand Up @@ -2074,7 +2074,7 @@ use URI::Escape qw{uri_unescape};

sub DESTROY { SOAP::Trace::objects('()') }

sub BEGIN {
BEGIN {
__PACKAGE__->__mk_accessors( qw(ids hrefs parts parser
base xmlschemas xmlschema context) );
}
Expand Down Expand Up @@ -2481,7 +2481,7 @@ package SOAP::Client;
use SOAP::Lite::Utils;

# VERSION
sub BEGIN {
BEGIN {
__PACKAGE__->__mk_accessors(qw(endpoint code message
is_success status options));
}
Expand Down Expand Up @@ -2665,7 +2665,7 @@ sub init_context {
weaken($self->{'_serializer'}->{'_context'});
}

sub BEGIN {
BEGIN {
no strict 'refs';
for my $method (qw(serializer deserializer transport)) {
my $field = '_' . $method;
Expand Down Expand Up @@ -3022,7 +3022,7 @@ sub _compileit {
};
}

sub BEGIN { foreach (qw(name type import use)) { _compileit($_) } }
BEGIN { foreach (qw(name type import use)) { _compileit($_) } }

sub AUTOLOAD {
my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::') + 2);
Expand Down Expand Up @@ -3265,7 +3265,7 @@ sub schema {
return shift->schema_url(@_);
}

sub BEGIN {
BEGIN {
no strict 'refs';
for my $method (qw(deserializer schema_url services useragent stub cache_dir cache_ttl)) {
my $field = '_' . $method;
Expand Down Expand Up @@ -3424,7 +3424,7 @@ EOP
UNIVERSAL::isa($som => 'SOAP::SOM') ? wantarray ? $som->paramsall : $som->result : $som;
}
sub BEGIN {
BEGIN {
no strict 'refs';
for my $method (qw(want_som)) {
my $field = '_' . $method;
Expand Down Expand Up @@ -3686,7 +3686,7 @@ sub schema {
}
}

sub BEGIN {
BEGIN {
no strict 'refs';
for my $method (qw(serializer deserializer)) {
my $field = '_' . $method;
Expand Down
6 changes: 3 additions & 3 deletions lib/SOAP/Lite/Packager.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use vars;
use vars qw($SUPPORTED_TYPES);
$SUPPORTED_TYPES = { };

sub BEGIN {
BEGIN {
no strict 'refs';
for my $method ( qw(parser headers_http persist_parts) ) {
my $field = '_' . $method;
Expand Down Expand Up @@ -88,7 +88,7 @@ use strict;
use vars qw(@ISA);
@ISA = qw(SOAP::Lite::Packager);

sub BEGIN {
BEGIN {
no strict 'refs';
for my $method ( qw(transfer_encoding env_id env_location) ) {
my $field = '_' . $method;
Expand Down Expand Up @@ -270,7 +270,7 @@ use strict;
use vars qw(@ISA);
@ISA = qw(SOAP::Lite::Packager);

sub BEGIN {
BEGIN {
no strict 'refs';
for my $method ( qw(foo) ) {
my $field = '_' . $method;
Expand Down
6 changes: 3 additions & 3 deletions lib/SOAP/Packager.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use vars;
# VERSION
our $SUPPORTED_TYPES = { };

sub BEGIN {
BEGIN {
no strict 'refs';
for my $method ( qw(parser headers_http persist_parts) ) {
my $field = '_' . $method;
Expand Down Expand Up @@ -82,7 +82,7 @@ use strict;
use vars qw(@ISA);
@ISA = qw(SOAP::Packager);

sub BEGIN {
BEGIN {
no strict 'refs';
for my $method ( qw(transfer_encoding env_id env_location) ) {
my $field = '_' . $method;
Expand Down Expand Up @@ -263,7 +263,7 @@ use strict;
use vars qw(@ISA);
@ISA = qw(SOAP::Packager);

sub BEGIN {
BEGIN {
no strict 'refs';
for my $method ( qw(foo) ) {
my $field = '_' . $method;
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 @@ -377,7 +377,7 @@ sub new {
return $self;
}

sub BEGIN {
BEGIN {
no strict 'refs';
for my $method (qw(request response)) {
my $field = '_' . $method;
Expand Down

0 comments on commit 5882f97

Please sign in to comment.