/[cvs]/nfo/perl/libs/Data/Storage/Result.pm
ViewVC logotype

Contents of /nfo/perl/libs/Data/Storage/Result.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Fri Nov 29 04:54:44 2002 UTC (21 years, 7 months ago) by joko
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +5 -2 lines
FILE REMOVED
- moved to Result/Abstract.pm

1 #################################
2 #
3 # $Id: Result.pm,v 1.1 2002/10/10 03:43:53 cvsjoko Exp $
4 #
5 # $Log: Result.pm,v $
6 # Revision 1.1 2002/10/10 03:43:53 cvsjoko
7 # + new
8 #
9 #
10 #################################
11
12 package Data::Storage::Result;
13
14 use strict;
15 use warnings;
16
17 # get logger instance
18 my $logger = Log::Dispatch::Config->instance;
19
20 sub new {
21 my $invocant = shift;
22 my $class = ref($invocant) || $invocant;
23 my $self = { type => $invocant, @_ };
24 bless $self, $class;
25 return $self;
26 }
27
28 sub AUTOLOAD {
29 my $self = shift;
30 our $AUTOLOAD;
31 return if $AUTOLOAD =~ m/::DESTROY$/;
32
33 # find out methodname
34 my $methodname = $AUTOLOAD;
35 $methodname =~ s/^.*:://;
36
37 # test for RESULTHANDLE
38 if (!$self->{RESULTHANDLE}) {
39 $logger->error( __PACKAGE__ . ": " . "RESULTHANDLE is undefined while trying to execute method \"$methodname\"" );
40 return;
41 }
42
43 # dispatch method-call to COREHANDLE
44 if ($self->{RESULTHANDLE}->can($methodname) || $self->{RESULTHANDLE}->can("AUTOLOAD")) {
45 #$logger->debug( __PACKAGE__ . "->" . $methodname . "(@_)" );
46 $self->{RESULTHANDLE}->$methodname(@_);
47 }
48
49 }
50
51 sub getNextEntry {
52 my $self = shift;
53 # TODO: to some tracelevel!
54 #$logger->debug( "$self->{type}->getNextEntry()" );
55 return $self->_getNextEntry();
56 }
57
58
59 1;

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed