Added guard to make sure values that cannot be read correctly aren't stored, plus...
[dbsrgits/DBM-Deep.git] / lib / DBM / Deep / Ref.pm
1 package DBM::Deep::Ref;
2
3 use strict;
4
5 use base 'DBM::Deep';
6
7 sub _get_self {
8     eval { local $SIG{'__DIE__'}; tied( ${$_[0]} ) } || $_[0]
9 }
10
11 sub 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
23 sub FETCH {
24     my $self = shift->_get_self;
25
26     #my $value = $self->
27 }
28
29 sub STORE {
30     my $self = shift->_get_self;
31     my ($value) = @_;
32 }
33
34 1;
35 __END__