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 |
# |
# |
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; |