Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for cperl strict hashpairs #17

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions LibXML.pm
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,8 @@ sub __write {

sub load_xml {
my $class_or_self = shift;
my %args = map { ref($_) eq 'HASH' ? (%$_) : $_ } @_;
my @args = map { ref($_) eq 'HASH' ? (%$_) : $_ } @_;
my %args = @args;

my $URI = delete($args{URI});
$URI = "$URI" if defined $URI; # stringify in case it is an URI object
Expand Down Expand Up @@ -792,7 +793,8 @@ sub load_xml {

sub load_html {
my ($class_or_self) = shift;
my %args = map { ref($_) eq 'HASH' ? (%$_) : $_ } @_;
my @args = map { ref($_) eq 'HASH' ? (%$_) : $_ } @_;
my %args = @args;
my $URI = delete($args{URI});
$URI = "$URI" if defined $URI; # stringify in case it is an URI object
my $parser;
Expand Down
2 changes: 2 additions & 0 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ unless ( $is_Win32 ) { # cannot get config in W32
[2,9,3,1], # schema regression
[2,9,4,0], # schema regression
[2,9,6,1],
[2,9,7,1], # tested, ok
);
my $xml2cfg = "xml2-config";
my $libprefix = $ENV{XMLPREFIX} || $config{XMLPREFIX};
Expand Down Expand Up @@ -300,6 +301,7 @@ GDOME
}
}
}

# -------------------------------------------------------------------------- #


Expand Down
6 changes: 4 additions & 2 deletions lib/XML/LibXML/Reader.pm
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ our %_preserve_flag;
}
sub setParserProp {
my $self = shift;
my %args = map { ref($_) eq 'HASH' ? (%$_) : $_ } @_;
my @args = map { ref($_) eq 'HASH' ? (%$_) : $_ } @_;
my %args = @args;
my ($key, $value);
while (($key,$value) = each %args) {
my $prop = $props{ $key };
Expand All @@ -128,7 +129,8 @@ our %_preserve_flag;
my (%string_pool,%rng_pool,%xsd_pool); # used to preserve data passed to the reader
sub new {
my ($class) = shift;
my %args = map { ref($_) eq 'HASH' ? (%$_) : $_ } @_;
my @args = map { ref($_) eq 'HASH' ? (%$_) : $_ } @_;
my %args = @args;
my $encoding = $args{encoding};
my $URI = $args{URI};
$URI="$URI" if defined $URI; # stringify in case it is an URI object
Expand Down