Got arrays working, requiring that make_reference and clone be added and functional
[dbsrgits/DBM-Deep.git] / lib / DBM / Deep / Sector.pm
CommitLineData
2c70efe1 1package DBM::Deep::Sector;
2
3use 5.006_000;
4
5use strict;
6use warnings FATAL => 'all';
7
8use Scalar::Util ();
9
10sub new {
11 my $self = bless $_[1], $_[0];
12 Scalar::Util::weaken( $self->{engine} );
13 $self->_init;
14 return $self;
15}
16
17sub _init {}
641aa32d 18#sub clone { die "clone must be implemented in a child class" }
19sub clone {
20 my $self = shift;
21 return ref($self)->new({
22 engine => $self->engine,
23 type => $self->type,
24 data => $self->data,
25 });
26}
27
2c70efe1 28
29sub engine { $_[0]{engine} }
30sub offset { $_[0]{offset} }
31sub type { $_[0]{type} }
32
33sub load { die "load must be implemented in a child class" }
34
351;
36__END__