Skip to content

Commit b9e0717

Browse files
committed
ParseXS: 5.8.9 backcompat fixes
A couple of fixes to make it build+test under 5.8.9. The grep expression exists $_->{in_out} && $_->{in_out} =~ /OUT$/ was wrong - it should have been defined rather than exists, as is done elsewhere. I'm not sure why an 'uninit var' warning only appeared on 5.8.9 but not blead - perhaps some minor autovivification difference? It was also warning $ExtUtils::ParseXS::DIE_ON_ERROR only used once $ExtUtils::ParseXS::AUTHOR_WARNINGS only used once in t/001-basic.t because that test file only loads ExtUtils::ParseXS at runtime. Again, I'm not sure why it didn't warn on blead too. But I made the var initialisations more robust against 'once' warnings anyway by using 'our'.
1 parent f2d49d0 commit b9e0717

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ EOF
12501250

12511251
for my $param (
12521252
grep {
1253-
exists $_->{in_out}
1253+
defined $_->{in_out}
12541254
&& $_->{in_out} =~ /OUT$/
12551255
&& !$self->{xsub_map_varname_to_seen_in_OUTPUT}{$_->{var}}
12561256
}

dist/ExtUtils-ParseXS/t/001-basic.t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ require_ok( 'ExtUtils::ParseXS' );
2929
chdir('t') if -d 't';
3030
push @INC, '.';
3131

32-
$ExtUtils::ParseXS::DIE_ON_ERROR = 1;
33-
$ExtUtils::ParseXS::AUTHOR_WARNINGS = 1;
32+
package ExtUtils::ParseXS;
33+
our $DIE_ON_ERROR = 1;
34+
our $AUTHOR_WARNINGS = 1;
35+
package main;
3436

3537
use Carp; #$SIG{__WARN__} = \&Carp::cluck;
3638

0 commit comments

Comments
 (0)