#!/usr/bin/env perl

# Handle logging by redirecting STDERR to a file
unlink 'err.log';
open STDERR, ">>err.log";
print STDERR "[".__PACKAGE__."] Opening log file at ".localtime."\n";

use App::DuckDuckGo::UI;

my $UI = App::DuckDuckGo::UI->new;
$UI->duck(join(' ', @ARGV)) if @ARGV;
$UI->run;

print STDERR "[".__PACKAGE__."] Nothing fatal; closing log file at ".localtime."\n";
close STDERR;
