[Koha-bugs] [Bug 12151] remove remaining uses of the Perl smartmatch operator

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jun 11 14:22:10 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12151

--- Comment #8 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Jonathan Druart from comment #7)
> Comment on attachment 28580 [details] [review]
> Bug 12151: Remove uses of smartmatch operator in Search.pm and opac-search.pl
> 
> Review of attachment 28580 [details] [review]:
> -----------------------------------------------------------------
> 
> ::: C4/Search.pm
> @@ +533,4 @@
> >                                  foreach my $field (@fields) {
> >                                      my $data = $field->as_string( $subfield_letters, $facet->{sep} );
> >  
> > +                                    unless ( any { $data eq $_ } @used_datas ) {
> 
> Why don't you use grep?
>   unless( grep /^$date$/, @used_datas )
> 
> Should do the same without the List::MoreUtils deps.

I was more used to the Lists::Moreutils which don't have much footprint, and
was already used all over the project.

Feel free to change it.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list