projects
/
koha.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Bug 22824: Adjust tests to match final behaviours
[koha.git]
/
Koha
/
MoreUtils.pm
1
package Koha::MoreUtils;
2
3
use Modern::Perl;
4
5
# From List::MoreUtils v4.0
6
sub singleton {
7
my %seen = ();
8
my $k;
9
my $seen_undef;
10
grep { 1 == ( defined $_ ? $seen{ $k = $_ } : $seen_undef ) }
11
grep { defined $_ ? not $seen{ $k = $_ }++ : not $seen_undef++ } @_;
12
}
13
14
1;