Data-ObjectStore
view release on metacpan or search on metacpan
lib/Data/ObjectStore.pm view on Meta::CPAN
package Data::ObjectStore;
use strict;
use warnings;
no warnings 'numeric';
no warnings 'uninitialized';
no warnings 'recursion';
use File::Path qw( make_path );
use Scalar::Util qw(weaken);
use Time::HiRes qw(time);
use vars qw($VERSION);
use Data::RecordStore;
use Data::ObjectStore::Cache;
$VERSION = '2.13';
our $DEBUG = 0;
our $UPGRADING;
lib/Data/ObjectStore.pm view on Meta::CPAN
sub _store_weak {
my( $self, $id, $ref ) = @_;
if( $self->[CACHE] ) {
$self->[CACHE]->stow( $id, $ref );
}
$self->[WEAK]{$id} = $ref;
weaken( $self->[WEAK]{$id} );
} #_store_weak
sub _dirty {
my( $self, $id ) = @_;
my $item = $self->[WEAK]{$id};
$self->[DIRTY]{$id} = $item;
$item = $self->_knot( $item );
if( $item ) {
$item->[METADATA]{updated} = time();
( run in 0.249 second using v1.01-cache-2.11-cpan-65fba6d93b7 )