diff options
-rwxr-xr-x | Build.PL | 1 | ||||
-rwxr-xr-x | bin/gtk-fair-viewer | 8 |
2 files changed, 8 insertions, 1 deletions
@@ -57,7 +57,6 @@ my $builder = Module::Build->new( 'File::ShareDir' => 0, 'Storable' => 0, 'Digest::MD5' => 0, - 'List::Util' => 1.43, ) : (), }, diff --git a/bin/gtk-fair-viewer b/bin/gtk-fair-viewer index 2053051..c8ef73b 100755 --- a/bin/gtk-fair-viewer +++ b/bin/gtk-fair-viewer @@ -647,6 +647,14 @@ foreach my $path($CONFIG{cache_dir}, $CONFIG{captions_dir}) { require List::Util; + # Workaround for List::Util < 1.45 + if (!defined(&List::Util::uniq)) { + *List::Util::uniq = sub { + my %seen; + grep { !$seen{$_}++ } @_; + }; + } + # Keep only the most recent non-duplicated entries @history = reverse(List::Util::uniq(reverse(@history))); @search_history = List::Util::uniq(@search_history); |