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

Diff of /nfo/perl/libs/Data/Storage/Locator.pm

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

revision 1.1 by cvsjoko, Thu Oct 10 03:43:53 2002 UTC revision 1.2 by joko, Thu Oct 17 00:06:16 2002 UTC
# Line 1  Line 1 
1  #################################  #################################
2  #  #
3  #  $Id$  #  $Id$
4  #  #
5  #  $Log$  #  $Log$
6    #  Revision 1.2  2002/10/17 00:06:16  joko
7    #  + advanced constructor argument shift-in
8    #
9  #  Revision 1.1  2002/10/10 03:43:53  cvsjoko  #  Revision 1.1  2002/10/10 03:43:53  cvsjoko
10  #  + new  #  + new
11  #  #
# Line 10  Line 13 
13  #################################  #################################
14    
15  package Data::Storage::Locator;  package Data::Storage::Locator;
16    
17  use strict;  use strict;
18  use warnings;  use warnings;
19    
20  # get logger instance  # get logger instance
21  my $logger = Log::Dispatch::Config->instance;  my $logger = Log::Dispatch::Config->instance;
22    
23  sub new {  sub new {
24    my $invocant = shift;    my $invocant = shift;
25    my $class = ref($invocant) || $invocant;    my $class = ref($invocant) || $invocant;
26    my $self = { @_ };  
27    $logger->debug( __PACKAGE__ . "->new(@_)" );    # get constructor arguments
28    return bless $self, $class;    my @args = ();
29  }    @_ && (@args = @_);
30      $logger->debug( __PACKAGE__ . "->new( @args )" );
31  sub native {  
32    my $self = shift;    my $self = { @_ };
33    my $arg = shift;    return bless $self, $class;
34    if ($arg) {  }
35      $self->{native} = $arg;  
36      #$self->_native2abstract();  sub native {
37    } else {    my $self = shift;
38      return $self->{native};    my $arg = shift;
39    }    if ($arg) {
40  }      $self->{native} = $arg;
41        #$self->_native2abstract();
42  sub _native2abstract {    } else {
43    my $self = shift;      return $self->{native};
44        }
45  }  }
46    
47  sub _abstract2native {  sub _native2abstract {
48    my $self = shift;    my $self = shift;
49  }    
50    }
51  1;  
52    sub _abstract2native {
53      my $self = shift;
54    }
55    
56    1;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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