Base, GrabberBase: change hash keys for connectors
authorRalf Ertzinger <ralf@skytale.net>
Sat, 3 Sep 2011 23:31:01 +0000 (01:31 +0200)
committerRalf Ertzinger <ralf@skytale.net>
Sat, 3 Sep 2011 23:31:01 +0000 (01:31 +0200)
videosite/Base.pm
videosite/GrabberBase.pm

index 5381911..001ec56 100644 (file)
@@ -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') {
index 8ff32b4..e39be83 100644 (file)
@@ -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)) {