[Bug 25898] New: Prohibit indirect object notation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Bug ID: 25898 Summary: Prohibit indirect object notation Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: julian.maurice@biblibre.com Reporter: julian.maurice@biblibre.com QA Contact: testopia@bugs.koha-community.org Indirect object notation is when you write: my $cgi = new CGI; Recently announced Perl 7 (https://www.perl.com/article/announcing-perl-7/) will disable this notation by default. We should write instead: my $cgi = CGI->new Perl 7 does not have a release date yet, but it's better to be prepared :) This bug is for adding a rule in .perlcriticrc and removing all indirect object notations. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 106423 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106423&action=edit Bug 25898: Prohibit indirect object notation -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Would it make sense to create a Perl 7 Omnibus bug we can use for these? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #3 from David Cook <dcook@prosentient.com.au> --- This is great to see, although also impossible to test? I guess if we can get it into master ASAP though then there's a better chance of any issues being caught early in this release cycle. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 --- Comment #4 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Katrin Fischer from comment #2)
Would it make sense to create a Perl 7 Omnibus bug we can use for these?
If I understood correctly there would be only 2 bugs under that omnibus : this one, and one for removing bareword filehandle. I'll let you decide if it makes sense to have an omnibus ;) (In reply to David Cook from comment #3)
This is great to see, although also impossible to test?
I agree. The only reasonable way to "test" would be to carefully review the patch change by change. If it can help, I did it with `git show --word-diff=color --word-diff-regex=.` (It takes time, prepare some coffee/tea/mate first) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |26303 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26303 [Bug 26303] [OMNIBUS] Preparing for Perl 7 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Keywords| |rel_20_11_target -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |https://wiki.koha-community | |.org/wiki/Coding_Guidelines | |#PERL29:_Direct_Object_Nota | |tion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #2)
Would it make sense to create a Perl 7 Omnibus bug we can use for these?
Jonathan has opened one at Bug 26303 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |RM_priority -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106423|0 |1 is obsolete| | --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 111351 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111351&action=edit Bug 25898: Prohibit indirect object notation Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 111352 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111352&action=edit Bug 25898: (follow-up) POD Our docs shouldn't suggest indirect object notation is accepted or encouraged. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- There are some POD and whitespace fails here, but I think they can be safely ignored for a patch like this one: FAIL misc/batchImportMARCWithBiblionumbers.pl OK critic FAIL forbidden patterns forbidden pattern: tab char (line 81) FAIL cataloguing/additem.pl OK critic FAIL forbidden patterns forbidden pattern: tab char (line 168) OK git manipulation BTW: Running the QA test tools on this one takes foreeeever. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- C4/ILSDI/Services.pm: my $cgi = new CGI; C4/InstallAuth.pm: my $query = new CGI; C4/SIP/ILS.pm: # $item = new ILS::Item $i; C4/SIP/ILS.pod: my $ils = new ILS (institution => 'Foo Public Library'); C4/SIP/ILS.pod: $ils = new ILS $institution C4/SIP/ILS/Item.pod: my $item = new ILS::Item $item_id; C4/Utils/DataTables.pm: my $input = new CGI; admin/background_jobs.pl:my $input = new CGI; debian/list-deps:my $pm = new Parallel::ForkManager( Sys::CPU::cpu_count() ); For some of those I am not sure - I suggest to deal with them in a follow-up and of course we will also need a check in the QA script! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111351|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111588 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111588&action=edit Bug 25898: Prohibit indirect object notation Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111352|0 |1 is obsolete| | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111589 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111589&action=edit Bug 25898: (follow-up) POD Our docs shouldn't suggest indirect object notation is accepted or encouraged. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 111714 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111714&action=edit Bug 25898: Fix new occurrences -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Added to the perlcriticrc used by the QA script https://gitlab.com/koha-community/qa-test-tools/-/issues/41 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 --- Comment #15 from Mason James <mtj@kohaaloha.com> --- Created attachment 112525 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112525&action=edit Bug 25898: Prohibit indirect object notation fix Parallel::ForkManager call in debian/list-deps -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com Status|Pushed to master |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P1 - high Severity|enhancement |blocker -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #112525|Bug 25898: Prohibit |Bug 25898: fix description|indirect object notation |Parallel::ForkManager call | |in debian/list-deps -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_20_11_target, | |RM_priority | --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Mason James from comment #15)
Created attachment 112525 [details] [review] Bug 25898: fix Parallel::ForkManager call in debian/list-deps
fix Parallel::ForkManager call in debian/list-deps
Patch pushed to master (by Tomas on Oct 26). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #17 from Lucas Gass <lucas@bywatersolutions.com> --- does not apply cleanly to 20.05.x, no backport -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27327 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25898 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|blocker |enhancement -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org