Skip to content

ETT-1394 address warning: "CGI::Param called in list context"#234

Merged
moseshll merged 7 commits into
mainfrom
ETT-1394_cgi_param_list_context
Jun 30, 2026
Merged

ETT-1394 address warning: "CGI::Param called in list context"#234
moseshll merged 7 commits into
mainfrom
ETT-1394_cgi_param_list_context

Conversation

@moseshll

@moseshll moseshll commented Jun 26, 2026

Copy link
Copy Markdown
Contributor
  • Include mb/t/ in perl-test

  • Address and test LS::PIFiller::ListSearchResults::handle_ANALYTICS_REPORT_URL_PI

  • Address and test MBooks::PIFiller::ListUtils::handle_ANALYTICS_REPORT_URL_PI

  • Address issue in MBooks::Operation::LogoutTrap::redirect_and_exit

    • Not really testable for reasons cited in ticket:

    Perl gets mad at the exit call and complains “A context appears to have been destroyed without first calling release…” with a half page of noise.

    • The function in question calls exit and it appears its call to MBooks::View::P_redirect_HTTP also calls exit.
    • I had a go with Test::Trap and Test::Exit but to no avail.
  • Address issue in PT::Prolog::Run

    • No tests because the method is enormous and the prospect of scaffolding a unit test is daunting.

There are no other issues flagged in the error logs I could find in the past 30 days.

moseshll added 5 commits June 26, 2026 16:45
  - Fix and tests for `handle_ANALYTICS_REPORT_URL_PI`
- Not really testable for reasons cited in ticket
- No tests because the method is enormous and the prospect of scaffolding a unit test is daunting.
@moseshll moseshll marked this pull request as ready for review June 29, 2026 13:40
@moseshll moseshll requested a review from aelkiss June 29, 2026 13:41

@aelkiss aelkiss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The actual fixes look good.

Looking at the tests, it doesn't seem like they'd fail if the changes in the code weren't there. Maybe worth considering if there's any reasonable way to test that there are no warnings, if it's easy (see e.g. https://perlmaven.com/test-for-warnings-in-a-perl-module)? That said, the tests can at least serve as regression tests if nothing else, if we aren't easily able to test the lack of warnings.

Comment thread ls/lib/LS/PIFiller/ListSearchResults.pm
…ere are none in the PIFiller tests.

- We can probably use this approach when we get around to the Date::Manip warnings, and anything else
  clogging the logs.
@moseshll

Copy link
Copy Markdown
Contributor Author

@aelkiss This latest addition was a useful one, as noted, when we tackle Date::Manip and other nonsense clogging up the logs.

Comment thread ls/t/LS/PIFiller/ListSearchResults.t Outdated
- Clean up and fix some outdated comments.
@moseshll moseshll requested a review from aelkiss June 30, 2026 13:08

@aelkiss aelkiss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good to me. We could potentially refactor some of the warning checking stuff especially if we use it more widely (e.g. when addressing Date::Manip) but this is good for now.

@moseshll moseshll merged commit 89efd12 into main Jun 30, 2026
3 checks passed
@moseshll moseshll deleted the ETT-1394_cgi_param_list_context branch June 30, 2026 14:42
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.

2 participants