mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Drop dependency on List::MoreUtils
This commit is contained in:
parent
babe54bf97
commit
8b8fe6139e
2 changed files with 13 additions and 3 deletions
|
@ -6,3 +6,14 @@ sub checkURL {
|
|||
my ($url) = @_;
|
||||
die "invalid URL ‘$url’\n" unless $url =~ /^ $urlRE $ /x;
|
||||
}
|
||||
|
||||
sub uniq {
|
||||
my %seen;
|
||||
my @res;
|
||||
foreach my $name (@_) {
|
||||
next if $seen{$name};
|
||||
$seen{$name} = 1;
|
||||
push @res, $name;
|
||||
}
|
||||
return @res;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue