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

Warn if a macro file has a POD directive on the first line but don't fail. #962

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

drgrice1
Copy link
Member

@drgrice1 drgrice1 commented Nov 9, 2023

This adds a new line to the beginning of the code for a macro file that starts with = which will usually mean an invalid POD directive on the first line of the file (and is invalid in any case for the first character of a Perl file).

In that case a warning is also shown. This warning will only be shown if the view_problem_debugging_info flag is set (this corresponds to the webwork2 permission that ta's and above have).

This is to address issue #961.

…fail.

This adds a new line to the beginning of the code for a macro file that
starts with `=` which will usually mean an invalid POD directive on the
first line of the file (and is invalid in any case for the first
character of a Perl file).

In that case a warning is also shown.  This warning will only be shown
if the view_problem_debugging_info flag is set (this corresponds to the
webwork2 permission that ta's and above have).

This is to address issue openwebwork#961.
Copy link
Contributor

@somiaj somiaj left a comment

Choose a reason for hiding this comment

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

This fixes the issue and provides a much better warning of the invalid POD.

This is a nice protection for others who many have invalid POD in macros.

Copy link
Member

@pstaabp pstaabp left a comment

Choose a reason for hiding this comment

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

fixes it and nice warning message.

@pstaabp pstaabp merged commit 3c2a031 into openwebwork:develop Nov 10, 2023
2 checks passed
@drgrice1 drgrice1 deleted the warn-invalid-first-line-pod branch November 10, 2023 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants