Basset::Container::Hash implements a layered hash. The easiest way to explain is with an example:
my %x = ('a' => 'b'); tie my %y, 'Basset::Container::Hash', \%x; #<- %x is the parent of 'y'. print $x{'a'}; #prints b print $y{'a'}; #prints b (inherited from x) $y{'a'} = 'foo'; $y{'z'} = 'bar'; print $x{'a'}; #prints b print $y{'a'}; #prints foo (overriden in y) print $x{'z'}; #prints undef (not defined in x print $y{'z'}; #prints bar (overridden from x) delete $y{'a'}; print $x{'a'}; #prints b print $y{'a'}; #prints b (inherited from x) $x{'b'} = 'c'; print $x{'b'}; #prints c print $y{'b'}; #prints c (inherited from x)
To install Basset::DB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Basset::DB
CPAN shell
perl -MCPAN -e shell install Basset::DB
For more information on module installation, please visit the detailed CPAN module installation guide.