Hash-Persistent

 view release on metacpan or  search on metacpan

lib/Hash/Persistent.pm  view on Meta::CPAN

        }
        else {
            $self = thaw($str);
            $_self->{format} = 'storable' if $_self->{format} eq 'auto';
        }
    } else {
        $_self->{format} = 'json' if $_self->{format} eq 'auto'; # default format for new files
        $self = {};
    }

    bless $self => $class;
    $meta->{$self} = $_self;
    return $self;
}

sub commit {
    my $self = shift;
    my $_self = $meta->{$self};

    if ($_self->{removed}) {
        croak "$_self->{fname} is already removed and can't be commited";

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.160 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )