Bugzilla – Attachment 9034 Details for
Bug 2505
Omnibus: Enable Perl warnings in all modules and scripts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 2505 - enable Perl warnings in all modules and scripts
Bug-2505---enable-Perl-warnings-in-all-modules-and.patch (text/plain), 3.22 KB, created by
Chris Cormack
on 2012-04-09 07:30:42 UTC
(
hide
)
Description:
Bug 2505 - enable Perl warnings in all modules and scripts
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2012-04-09 07:30:42 UTC
Size:
3.22 KB
patch
obsolete
>From a22e836986ce400ff4ecdfb74cfccbcc3e0af99c Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Thu, 15 Mar 2012 21:06:22 +1300 >Subject: [PATCH] Bug 2505 - enable Perl warnings in all modules and scripts > >enable warnings, and correct perlcritic's 'Loop iterator is not lexical' errors in C4/Ris.pm > > modified: C4/Ris.pm > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > C4/Ris.pm | 38 +++++++++++++++++++------------------- > 1 files changed, 19 insertions(+), 19 deletions(-) > >diff --git a/C4/Ris.pm b/C4/Ris.pm >index 085b09c..8c2efe5 100644 >--- a/C4/Ris.pm >+++ b/C4/Ris.pm >@@ -59,8 +59,8 @@ package C4::Ris; > # > # > >-#use strict; >-#use warnings; FIXME - Bug 2505 >+use strict; >+use warnings; > > use vars qw($VERSION @ISA @EXPORT); > >@@ -763,7 +763,7 @@ sub get_keywords { > my @subfields = ('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'x', 'y', 'z', '2', '3', '4'); > > ## loop over all 6XX fields >- foreach $kwfield (@keywords) { >+ foreach my $kwfield (@keywords) { > if ($kwfield != undef) { > ## authornames get special treatment > if ($fieldname eq "600") { >@@ -776,9 +776,9 @@ sub get_keywords { > @kwsubfields = $kwfield->subfields(); > > ## loop over all available subfield tuples >- foreach $kwtuple (@kwsubfields) { >+ foreach my $kwtuple (@kwsubfields) { > ## loop over all subfields to check >- foreach $subfield (@subfields) { >+ foreach my $subfield (@subfields) { > ## [0] contains subfield code > if (@$kwtuple[0] eq $subfield) { > ## [1] contains value, remove trailing separators >@@ -886,15 +886,15 @@ sub pool_subx { > } > > ## loop over all notefields >- foreach $notefield (@notefields) { >+ foreach my $notefield (@notefields) { > if ($notefield != undef) { > ## retrieve all available subfield tuples > @notesubfields = $notefield->subfields(); > > ## loop over all subfield tuples >- foreach $notetuple (@notesubfields) { >+ foreach my $notetuple (@notesubfields) { > ## loop over all subfields to check >- foreach $subfield (@subfields) { >+ foreach my $subfield (@subfields) { > ## [0] contains subfield code > if (@$notetuple[0] eq $subfield) { > ## [1] contains value, remove trailing separators >@@ -927,20 +927,20 @@ sub print_abstract { > my @abstrings; > > ## loop over all abfields >- foreach $abfield (@abfields) { >- foreach $field (@subfields) { >- if (length ($abfield->subfield($field)) > 0) { >- my $ab = $abfield->subfield($field); >+ foreach my $abfield (@abfields) { >+ foreach my $field (@subfields) { >+ if ( length( $abfield->subfield($field) ) > 0 ) { >+ my $ab = $abfield->subfield($field); > >- print "<marc>field 520 subfield $field: $ab\r\n" if $marcprint; >+ print "<marc>field 520 subfield $field: $ab\r\n" if $marcprint; > >- ## strip trailing separators >- $ab =~ s% *[;,:./]*$%%; >+ ## strip trailing separators >+ $ab =~ s% *[;,:./]*$%%; > >- ## add string to the list >- push (@abstrings, $ab); >- } >- } >+ ## add string to the list >+ push( @abstrings, $ab ); >+ } >+ } > } > > my $allabs = join "; ", @abstrings; >-- >1.7.5.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 2505
:
686
|
687
|
688
|
689
|
690
|
691
|
692
|
693
|
694
|
695
|
696
|
697
|
698
|
699
|
700
|
701
|
702
|
703
|
704
|
705
|
706
|
707
|
708
|
709
|
2223
|
3884
|
4574
|
8209
|
8317
|
8322
|
8373
|
9034
|
9035
|
9036
|
34442