Skip to content

Commit 6644e00

Browse files
committed
ParseXS: fix under older perls
One line had: 'exists $param->{type}' as part of a condition. This worked fine when $param was a normal hash ref (created under 'use fields'), but the combination of: - a recent commit which copies those hashes to $sig->{old_params} then resets some of the fields (to allow for multiple CASEs); - older perls (in particular 5.8.9) which used pseudo-hashes to implement fields, was causing the field to spring into existence, even though it wasn't defined. So change the test from 'exists' to 'defined'.
1 parent a67a29a commit 6644e00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2008,7 +2008,7 @@ sub INPUT_handler {
20082008
# synthetic params like THIS, which are assigned a provisional type
20092009
# which can be overridden.
20102010
if ( $param->{in_input}
2011-
or (!$param->{is_synthetic} and exists $param->{type})
2011+
or (!$param->{is_synthetic} and defined $param->{type})
20122012
) {
20132013
$self->blurt(
20142014
"Error: duplicate definition of parameter '$var_name' ignored");

0 commit comments

Comments
 (0)