Skip to content

Fix an invalid import that is causing warnings.#2987

Merged
somiaj merged 1 commit into
openwebwork:WeBWorK-2.21from
drgrice1:bugfix/invalid-import
May 27, 2026
Merged

Fix an invalid import that is causing warnings.#2987
somiaj merged 1 commit into
openwebwork:WeBWorK-2.21from
drgrice1:bugfix/invalid-import

Conversation

@drgrice1
Copy link
Copy Markdown
Member

The write_log_entry method is imported from the WeBWorK::Authen package in lib/WeBWorK/ContentGenerator/Logout.pm (via the use WeBWorK::Authen qw(write_log_entry) call). However, the WeBWorK::Authen package does not define the import method (since it does not derive from the Exporter package). As a result warnings occur when this package is loaded. These warnings have become more prevalant recently (perhaps the perl 5.40 is more strict on this?).

Also, the write_log_entry is incorrectly called later in that package. The write_log_entry method is an object method and there is no need for the package name in the call.

The `write_log_entry` method is imported from the `WeBWorK::Authen`
package in `lib/WeBWorK/ContentGenerator/Logout.pm` (via the `use
WeBWorK::Authen qw(write_log_entry)` call).  However, the
`WeBWorK::Authen` package does not define the `import` method (since it
does not derive from the `Exporter` package).  As a result warnings
occur when this package is loaded.  These warnings have become more
prevalant recently (perhaps the perl 5.40 is more strict on this?).

Also, the `write_log_entry` is incorrectly called later in that package.
The `write_log_entry` method is an object method and there is no need
for the package name in the call.
@drgrice1 drgrice1 force-pushed the bugfix/invalid-import branch from 9b4a32b to 5061879 Compare May 27, 2026 02:32
@somiaj somiaj merged commit 812a883 into openwebwork:WeBWorK-2.21 May 27, 2026
2 checks passed
@drgrice1 drgrice1 deleted the bugfix/invalid-import branch May 27, 2026 18: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