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 bareword in Zonemaster::Engine. #1380

Merged
merged 1 commit into from
Aug 21, 2024
Merged

Conversation

emollier
Copy link

@emollier emollier commented Aug 8, 2024

Purpose

This request consists in invoking Zonemaster::Engine::Recursor::init_recursor method instead of readying it for futher invocation, as a syntax check flags it as a Bareword.

Context

Running Debian Perl Team's syntax checks on Zonemaster::Engine reveals the following issues:

# Bareword "Zonemaster::Engine::Recursor::init_recursor" not allowed while "strict subs" in use at /usr/share/perl5/Zonemaster/Engine.pm line 40.
# Compilation failed in require at /usr/share/perl5/Zonemaster/Engine/Recursor.pm line 15.
# BEGIN failed--compilation aborted at /usr/share/perl5/Zonemaster/Engine/Recursor.pm line 15.
# Compilation failed in require at /usr/share/perl5/Zonemaster/Engine/Test/Address.pm line 13.
# BEGIN failed--compilation aborted at /usr/share/perl5/Zonemaster/Engine/Test/Address.pm line 13.
# Compilation failed in require at /usr/share/perl5/Zonemaster/Engine/Test/Consistency.pm line 14.
# BEGIN failed--compilation aborted at /usr/share/perl5/Zonemaster/Engine/Test/Consistency.pm line 14.
not ok 17 - /usr/bin/perl -wc /usr/share/perl5/Zonemaster/Engine/Test/Consistency.pm exited successfully
[…]
# Bareword "Zonemaster::Engine::Recursor::init_recursor" not allowed while "strict subs" in use at /usr/share/perl5/Zonemaster/Engine.pm line 40.
# Compilation failed in require at /usr/share/perl5/Zonemaster/Engine/Recursor.pm line 15.
# BEGIN failed--compilation aborted at /usr/share/perl5/Zonemaster/Engine/Recursor.pm line 15.
# Compilation failed in require at /usr/share/perl5/Zonemaster/Engine/Test/Zone.pm line 19.
# BEGIN failed--compilation aborted at /usr/share/perl5/Zonemaster/Engine/Test/Zone.pm line 19.
not ok 20 - /usr/bin/perl -wc /usr/share/perl5/Zonemaster/Engine/Test/Zone.pm exited successfully

This seems to be caused by missing parenthesis to trigger the invocation of Zonemaster::Engine::Recursor::init_recursor method.

Changes

Restoring these parenthesis looks to fix, or at least works around, the issue.

How to test this PR

I ran the Debian Perl Team test, which includes routines to invoke the full upstream test suite but also the syntax check, and made sure the issue was resolved.

Running Debian Perl Team's syntax checks on Zonemaster::Engine reveals
the following issues:

	# Bareword "Zonemaster::Engine::Recursor::init_recursor" not allowed while "strict subs" in use at /usr/share/perl5/Zonemaster/Engine.pm line 40.
	# Compilation failed in require at /usr/share/perl5/Zonemaster/Engine/Recursor.pm line 15.
	# BEGIN failed--compilation aborted at /usr/share/perl5/Zonemaster/Engine/Recursor.pm line 15.
	# Compilation failed in require at /usr/share/perl5/Zonemaster/Engine/Test/Address.pm line 13.
	# BEGIN failed--compilation aborted at /usr/share/perl5/Zonemaster/Engine/Test/Address.pm line 13.
	# Compilation failed in require at /usr/share/perl5/Zonemaster/Engine/Test/Consistency.pm line 14.
	# BEGIN failed--compilation aborted at /usr/share/perl5/Zonemaster/Engine/Test/Consistency.pm line 14.
	not ok 17 - /usr/bin/perl -wc /usr/share/perl5/Zonemaster/Engine/Test/Consistency.pm exited successfully
	[…]
	# Bareword "Zonemaster::Engine::Recursor::init_recursor" not allowed while "strict subs" in use at /usr/share/perl5/Zonemaster/Engine.pm line 40.
	# Compilation failed in require at /usr/share/perl5/Zonemaster/Engine/Recursor.pm line 15.
	# BEGIN failed--compilation aborted at /usr/share/perl5/Zonemaster/Engine/Recursor.pm line 15.
	# Compilation failed in require at /usr/share/perl5/Zonemaster/Engine/Test/Zone.pm line 19.
	# BEGIN failed--compilation aborted at /usr/share/perl5/Zonemaster/Engine/Test/Zone.pm line 19.
	not ok 20 - /usr/bin/perl -wc /usr/share/perl5/Zonemaster/Engine/Test/Zone.pm exited successfully

This seems to be caused by missing parenthesis to trigger the
invocation of Zonemaster::Engine::Recursor::init_recursor method.
Restoring them looks to fix, or at least works around, the issue.

Signed-off-by: Étienne Mollier <[email protected]>
@tgreenx tgreenx changed the base branch from master to develop August 19, 2024 11:37
@tgreenx tgreenx added the V-Patch Versioning: The change gives an update of patch in version. label Aug 19, 2024
@tgreenx tgreenx added this to the v2024.2 milestone Aug 19, 2024
Copy link
Contributor

@tgreenx tgreenx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the contribution. Note that I have changed the base branch from master to develop, which is the branch that should be used for this project (see https://github.com/zonemaster/zonemaster/blob/master/README.md#participation).

@matsduf matsduf merged commit dcf088f into zonemaster:develop Aug 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V-Patch Versioning: The change gives an update of patch in version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants