Added guard to make sure values that cannot be read correctly aren't stored, plus...
[dbsrgits/DBM-Deep.git] / lib / DBM / Deep / Ref.pm
CommitLineData
eea0d863 1package DBM::Deep::Ref;
df9a659d 2
3use strict;
4
5use base 'DBM::Deep';
6
7sub _get_self {
8 eval { local $SIG{'__DIE__'}; tied( ${$_[0]} ) } || $_[0]
9}
10
11sub TIESCALAR {
12 ##
13 # Tied hash constructor method, called by Perl's tie() function.
14 ##
15 my $class = shift;
16 my $args = $class->_get_args( @_ );
17
18 $args->{type} = $class->TYPE_SCALAR;
19
20 return $class->_init($args);
21}
22
eea0d863 23sub FETCH {
24 my $self = shift->_get_self;
25
26 #my $value = $self->
27}
28
29sub STORE {
30 my $self = shift->_get_self;
31 my ($value) = @_;
32}
33
df9a659d 341;
35__END__