Bug 9451 - borrower_stats.pl gives off warnings and is not Plack-compatible
Summary: borrower_stats.pl gives off warnings and is not Plack-compatible
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jared Camins-Esakov
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-22 23:37 UTC by Jared Camins-Esakov
Modified: 2014-05-26 21:04 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 9451: Quiet warnings and Plackify borrower_stats.pl (1.81 KB, patch)
2013-01-22 23:50 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
Bug 9451: Quiet warnings and Plackify borrower_stats.pl (1.85 KB, patch)
2013-02-08 08:28 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 9451: Quiet warnings and Plackify borrower_stats.pl (1.91 KB, patch)
2013-02-08 10:28 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Camins-Esakov 2013-01-22 23:37:04 UTC
Variable "$period" is not available at /home/jcamins/kohaclone/reports/borrowers_stats.pl line 265.
Use of uninitialized value in hash element at /home/jcamins/kohaclone/reports/bo
rrowers_stats.pl line 375.
Use of uninitialized value in hash element at /home/jcamins/kohaclone/reports/bo
rrowers_stats.pl line 376.
Comment 1 Jared Camins-Esakov 2013-01-22 23:50:58 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2013-02-08 08:28:57 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2013-02-08 10:27:57 UTC
QA comment:
Looks good.
The patch removes some warning in the log file under Plack.
No behavior changed under Apache.

Note: some others warnings still exist (subroutine foo redefined).

Marked as Passed QA.
Comment 4 Jonathan Druart 2013-02-08 10:28:10 UTC
Created attachment 15157 [details] [review]
Bug 9451: Quiet warnings and Plackify borrower_stats.pl

There are several warnings and one non-Plack-compatible variable in
reports/borrower_stats.pl.

To test:
1) Apply patch
2) Use the borrower report wizard to create a report that includes an
   extended patron attribute.
3) Check the logs, and make sure that you don't see any of the
   following messages:
   Variable "$period" is not available at
     /home/jcamins/kohaclone/reports/borrowers_stats.pl line 265.
   Use of uninitialized value in hash element at
     /home/jcamins/kohaclone/reports/borrowers_stats.pl line 375.
   Use of uninitialized value in hash element at
     /home/jcamins/kohaclone/reports/borrowers_stats.pl line 376.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 5 Jared Camins-Esakov 2013-02-08 13:42:51 UTC
This patch has been pushed to master.
Comment 6 Chris Cormack 2013-02-09 00:10:34 UTC
Pushed to 3.10.x will be in 3.10.3
Comment 7 Chris Cormack 2013-02-10 20:52:33 UTC
Comment on attachment 15157 [details] [review]
Bug 9451: Quiet warnings and Plackify borrower_stats.pl

Review of attachment 15157 [details] [review]:
-----------------------------------------------------------------

::: reports/borrowers_stats.pl
@@ +56,4 @@
>  $filters[3]=format_date_in_iso($filters[3]);
>  $filters[4]=format_date_in_iso($filters[4]);
>  my $digits = $input->param("digits");
> +our $period = $input->param("period");

Hmm, i still think our is kinda hacky, but it works