From: Ralf Ertzinger Date: Sat, 3 Sep 2011 23:31:01 +0000 (+0200) Subject: Base, GrabberBase: change hash keys for connectors X-Git-Url: https://git.camperquake.de/gitweb.cgi?p=videosite.git;a=commitdiff_plain;h=b929656189ab5eeb2e8378bb7f3299ef9597a5a1 Base, GrabberBase: change hash keys for connectors --- diff --git a/videosite/Base.pm b/videosite/Base.pm index 5381911..001ec56 100644 --- a/videosite/Base.pm +++ b/videosite/Base.pm @@ -12,8 +12,8 @@ sub new { my $class = shift; my $self = {'_DEBUG' => 0, '_OUT' => sub {printf(@_)}, - '_CONNECTORS' => sub { return ({ -name => 'direct', - -schemas => {} }) }, + '_CONNECTORS' => sub { return ({ 'name' => 'direct', + 'schemas' => {} }) }, '_CONNECTOR' => undef, }; @@ -187,7 +187,7 @@ sub ua { delete($ENV{'HTTPS_PROXY'}); if (defined($self->{'_CONNECTOR'})) { - my $schemas = $self->{'_CONNECTOR'}->{-schemas}; + my $schemas = $self->{'_CONNECTOR'}->{'schemas'}; foreach (keys(%{$schemas})) { $self->debug("Adding schema %s with proxy %s", $_, $schemas->{$_}); if ($_ eq 'https') { diff --git a/videosite/GrabberBase.pm b/videosite/GrabberBase.pm index 8ff32b4..e39be83 100644 --- a/videosite/GrabberBase.pm +++ b/videosite/GrabberBase.pm @@ -32,7 +32,7 @@ sub get($$) { if ($url =~ m|$pattern|) { $self->debug("Match"); foreach ($self->connectors()) { - $self->debug("Using connector %s", $_->{-name}); + $self->debug("Using connector %s", $_->{'name'}); $self->selectconn($_); $res = $self->_parse($url, $pattern); if (defined($res)) {