aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xBuild.PL1
-rwxr-xr-xbin/gtk-fair-viewer8
2 files changed, 8 insertions, 1 deletions
diff --git a/Build.PL b/Build.PL
index ba2b92a..a8c795b 100755
--- a/Build.PL
+++ b/Build.PL
@@ -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);