From 0e4b9927afa5f8dd94cefaea455107ca69176a9d Mon Sep 17 00:00:00 2001 From: Ralf Ertzinger Date: Wed, 24 Apr 2013 13:37:49 +0200 Subject: [PATCH] Use API for output --- videosite/Base.pm | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/videosite/Base.pm b/videosite/Base.pm index 11c7fa6..a081dce 100644 --- a/videosite/Base.pm +++ b/videosite/Base.pm @@ -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"; -- 1.8.3.1