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

Diff of /nfo/perl/libs/Data/Storage/Handler/Abstract.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by joko, Fri Apr 18 16:07:53 2003 UTC revision 1.19 by joko, Wed Jun 25 22:53:58 2003 UTC
# Line 2  Line 2 
2  ##    $Id$  ##    $Id$
3  ##    ------------------------------------------------------------------------  ##    ------------------------------------------------------------------------
4  ##    $Log$  ##    $Log$
5    ##    Revision 1.19  2003/06/25 22:53:58  joko
6    ##    don't disconnect automagically
7    ##
8    ##    Revision 1.18  2003/06/06 03:40:57  joko
9    ##    disabled autovivifying of arguments as attributes
10    ##
11    ##    Revision 1.17  2003/05/13 07:58:49  joko
12    ##    fix: die if methodname is empty
13    ##    fixes to log-string
14    ##
15  ##    Revision 1.16  2003/04/18 16:07:53  joko  ##    Revision 1.16  2003/04/18 16:07:53  joko
16  ##    just use logger if instantiation successed  ##    just use logger if instantiation successed
17  ##  ##
# Line 150  sub new { Line 160  sub new {
160    # handle meta data    # handle meta data
161      #my $metainfo = $self->getMetaInfo($class);      #my $metainfo = $self->getMetaInfo($class);
162      my $metainfo = $self->getMetaInfo();      my $metainfo = $self->getMetaInfo();
163      if (!$metainfo->{disconnectMethod}) { $metainfo->{disconnectMethod} = 'disconnect'; }      #if (!$metainfo->{disconnectMethod}) { $metainfo->{disconnectMethod} = 'disconnect'; }
164      # type?      # type?
165      $invocant =~ s/Data::Storage::Handler:://;      $invocant =~ s/Data::Storage::Handler:://;
166      $metainfo->{type} = $invocant;      $metainfo->{type} = $invocant;
# Line 240  sub AUTOLOAD { Line 250  sub AUTOLOAD {
250    }    }
251  #=cut  #=cut
252    
253    =pod
254      if (!$methodname) {
255        die("Methodname is not defined!");
256        return;
257      }
258    =cut
259    
260  #print "$methodname - 3", "\n";  #print "$methodname - 3", "\n";
261    
262    # try to dispatch method-call to Storage::Handler::*    # try to dispatch method-call to Storage::Handler::*
# Line 268  sub AUTOLOAD { Line 285  sub AUTOLOAD {
285      #$lock_AUTOLOAD = 1 if ($methodname eq 'insert');      #$lock_AUTOLOAD = 1 if ($methodname eq 'insert');
286      if (!$self->{lock_info}->{log_lock}) {      if (!$self->{lock_info}->{log_lock}) {
287        #print "method: $methodname", "\n";        #print "method: $methodname", "\n";
288        $logger->debug( __PACKAGE__ . "[$self->{metainfo}->{type}]" . "->" . $methodname . "(@_)" );        my $type = $self->{metainfo}->{type};
289          $type ||= '';
290          # FIXME!
291          #$logger->debug( __PACKAGE__ . "[$type]" . "->" . $methodname . "(@_)" );
292          $logger->debug( __PACKAGE__ . "[$type]" . "->" . $methodname );
293      } else {      } else {
294        # AUTOLOAD - sub is locked to prevent deep recursions if (e.g.) db-inserts cause log-actions to same db itself        # AUTOLOAD - sub is locked to prevent deep recursions if (e.g.) db-inserts cause log-actions to same db itself
295      }      }

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.19

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