Use API for output
authorRalf Ertzinger <ralf@skytale.net>
Wed, 24 Apr 2013 11:37:49 +0000 (13:37 +0200)
committerRalf Ertzinger <ralf@skytale.net>
Wed, 24 Apr 2013 11:37:49 +0000 (13:37 +0200)
videosite/Base.pm

index 11c7fa6..a081dce 100644 (file)
@@ -11,7 +11,6 @@ use Data::Dumper;
 sub new {
     my $class = shift;
     my $self = {'_DEBUG' => 0,
-                '_OUT' => sub {printf(@_)},
                 '_CONNECTORS' => sub { return ({ 'name' => 'direct',
                                                  'schemas' => {} }) },
                 '_CONNECTOR' => undef,
@@ -38,7 +37,7 @@ sub error {
 
     $data[0] = "(" . ref($self) . ") " . $data[0];
 
-    $self->{'_OUT'}(@data);
+    $self->{_API}->{io}->(@data);
 }
 
 sub debug {
@@ -99,13 +98,6 @@ sub setval {
     }
 }
 
-sub setio {
-    my $self = shift;
-    my $io = shift;
-
-    $self->{'_OUT'} = $io;
-}
-
 sub getconfstr {
     my $self = shift;
     my $s = 'Options for ' . $self->{'NAME'} . ":\n";