Bugzilla – Attachment 29522 Details for
Bug 12151
remove remaining uses of the Perl smartmatch operator
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 12151: Remove use of smartmatch operator in tools/batchMod.pl
PASSED-QA-Bug-12151-Remove-use-of-smartmatch-opera.patch (text/plain), 1.42 KB, created by
Katrin Fischer
on 2014-07-06 17:39:24 UTC
(
hide
)
Description:
[PASSED QA] Bug 12151: Remove use of smartmatch operator in tools/batchMod.pl
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-07-06 17:39:24 UTC
Size:
1.42 KB
patch
obsolete
>From 7040338069bd662d9e4ecd5b4db772ec4c2d9647 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Mon, 2 Jun 2014 11:30:48 -0300 >Subject: [PATCH] [PASSED QA] Bug 12151: Remove use of smartmatch operator in > tools/batchMod.pl > >The '~~' smartmatch operator is used to compare MARC::Field->subfield(code) >(i.e. a string) and the text element of each MARC::Field->subfields() which >is also plain text. > >Substituting '~~' for 'eq' should be harmless then. > >Regards >To+ > >Sponsored-by: Universidad Nacional de Cordoba > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Passes QA script and tests. >Tested batch modification of items, no problems found. >--- > tools/batchMod.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/tools/batchMod.pl b/tools/batchMod.pl >index 41d15cb..bda2eff 100755 >--- a/tools/batchMod.pl >+++ b/tools/batchMod.pl >@@ -580,7 +580,7 @@ sub UpdateMarcWith { > foreach my $subfield ( $fieldfrom->subfields() ) { > foreach my $field_to_update ( @fields_to ) { > if ( $subfield->[1] ) { >- unless ( $field_to_update->subfield($subfield->[0]) ~~ $subfield->[1] ) { >+ unless ( $field_to_update->subfield($subfield->[0]) eq $subfield->[1] ) { > $modified++; > $field_to_update->update( $subfield->[0] => $subfield->[1] ); > } >-- >1.9.1
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 12151
:
28580
|
28581
|
28615
|
28616
|
29013
|
29014
|
29015
|
29016
|
29487
|
29488
|
29489
|
29490
|
29519
|
29520
|
29521
| 29522 |
29523