aboutsummaryrefslogtreecommitdiffstats
path: root/bin/gtk-fair-viewer
diff options
context:
space:
mode:
Diffstat (limited to 'bin/gtk-fair-viewer')
-rwxr-xr-xbin/gtk-fair-viewer8
1 files changed, 8 insertions, 0 deletions
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);