Skip to content

Commit

Permalink
ParseXS: refactor: simplify require fields
Browse files Browse the repository at this point in the history
    require 'fields.pm'

can be written more simply as

    require fields

They compile to the same optree.
  • Loading branch information
iabyn committed Oct 18, 2024
1 parent b9e0717 commit 0a291b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ BEGIN {
# needs us. So only 'use fields' on systems where Hash::Util has already
# been built.
if (eval 'require Hash::Util; 1;') {
require 'fields.pm';
require fields;
$USING_FIELDS = 1;
fields->import(@fields);
}
Expand Down
2 changes: 1 addition & 1 deletion dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ BEGIN {
# needs us. So only 'use fields' on systems where Hash::Util has already
# been built.
if (eval 'require Hash::Util; 1;') {
require 'fields.pm';
require fields;
$USING_FIELDS = 1;
fields->import(@FIELDS);
}
Expand Down

0 comments on commit 0a291b5

Please sign in to comment.