X-Git-Url: https://git.camperquake.de/gitweb.cgi?p=videosite.git;a=blobdiff_plain;f=videosite-dl.pl;h=46c8b49eb0718f7678f2bed562c1a220ceabebe9;hp=1225b925904f5a7e4bbdec7e91726427f3e199bb;hb=01fc17a9fd2a11cd5826a2581fe662e96ac5912c;hpb=cfabedac3a6cbb07711ba6b87602d35161e2e53e diff --git a/videosite-dl.pl b/videosite-dl.pl index 1225b92..46c8b49 100755 --- a/videosite-dl.pl +++ b/videosite-dl.pl @@ -6,6 +6,9 @@ use File::Spec; use File::Basename; use Module::Load; use Cwd qw(realpath); +use Carp; + +$SIG{ __DIE__ } = sub { Carp::confess( @_ ) }; my $info = 0; my $debug = 0; @@ -37,13 +40,8 @@ push(@INC, dirname(realpath($0))); load 'libvideosite'; unless(libvideosite::register_api({ - config_init => sub {}, - config_save => sub {}, - config_get => sub { return $config{join(".", @{$_[0]})} }, - config_set => sub { $config{join(".", @{$_[0]})} = $_[1] }, - config_has => sub { exists($config{join(".", @{$_[0]})}) }, - config_del => sub { delete($config{join(".", @{$_[0]})}) }, link_callback => \&link_callback, + _config_default => sub { return \%config }, _debug => sub { return $debug }, })) { die("Error registering API: $libvideosite::error");