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

Add strict to modules shared to the PG safe zone in pg_config.dist.yml #995

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conf/pg_config.dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,4 @@ modules:
- ['Rserve']
- [DragNDrop]
- ['Types::Serialiser']
- [strict]
4 changes: 2 additions & 2 deletions lib/WeBWorK/PG/Translator.pm
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ BEGIN {

# The first item is the main package.
$module =~ s/\.pm$//;
eval "package Main; require $module; import $module;";
eval "package main; require $module; import $module;";
warn "Failed to evaluate module $module: $@" if $@;
push @$ra_included_modules, "\%${module}::";

Expand Down Expand Up @@ -194,7 +194,7 @@ sub evaluate_modules {
# Ensure that the name is in fact a base name.
s/\.pm$//;

eval "package Main; require $_; import $_";
eval "package main; require $_; import $_";
warn "Failed to evaluate module $_: $@" if $@;

# Record this in the appropriate place.
Expand Down
Loading