Remove unused feature to retain compatibility with old Perl.
Blergh, Debian Squeeze (which we use on our revbank system) is still at Perl 5.10...
This commit is contained in:
parent
d11d31ec2e
commit
371b82baec
1 changed files with 1 additions and 4 deletions
|
@ -106,9 +106,7 @@ sub checkout {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub select_items {
|
sub select_items {
|
||||||
my ($self, $key, $smartmatch) = @_;
|
my ($self, $key) = @_;
|
||||||
|
|
||||||
use v5.12; # New smartmatch semantics
|
|
||||||
|
|
||||||
my @matches;
|
my @matches;
|
||||||
for my $user (keys %$self) {
|
for my $user (keys %$self) {
|
||||||
|
@ -116,7 +114,6 @@ sub select_items {
|
||||||
push @matches, { user => $user, %$item }
|
push @matches, { user => $user, %$item }
|
||||||
if @_ == 1 # No key or match given: match everything
|
if @_ == 1 # No key or match given: match everything
|
||||||
or @_ == 2 and exists $item->{ $key } # Just a key
|
or @_ == 2 and exists $item->{ $key } # Just a key
|
||||||
or @_ == 3 and $item->{ $key } ~~ $smartmatch;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue