| 1 | package Hash::Persistent::Memory; | ||
| 2 | |||
| 3 | # ABSTRACT: in-memory persistent object which doesn't really store anything | ||
| 4 | |||
| 5 | use strict; | ||
| 6 | use warnings; | ||
| 7 | |||
| 8 | sub new { | ||
| 9 | return bless {} => shift; | ||
| 10 | } | ||
| 11 | |||
| 12 | sub commit {} | ||
| 13 | |||
| 14 | # we probably should cleanup $self contents, but Hash::Persistent currently doesn't do it. | ||
| 15 | sub remove { | ||
| 16 | my $self = shift; | ||
| 17 | delete $self->{$_} for keys %$self; | ||
| 18 | } | ||
| 19 | |||
| 20 | 1; | ||
| 21 | |||
| 22 | __END__ |