X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FStorage%2FEngine%2FIO%2FAtomicFile.pm;h=f2e10589e29179018bf58165cdbe56603d8fd311;hb=7b428d1fd844e32dc3500a1fefc6cd794dc45fc8;hp=902f7c56fb18170d3675ac0145c3d0112991ca65;hpb=6f0912d0ed26989e6b2967e027597dba7bece25e;p=gitmo%2FMooseX-Storage.git diff --git a/lib/MooseX/Storage/Engine/IO/AtomicFile.pm b/lib/MooseX/Storage/Engine/IO/AtomicFile.pm index 902f7c5..f2e1058 100644 --- a/lib/MooseX/Storage/Engine/IO/AtomicFile.pm +++ b/lib/MooseX/Storage/Engine/IO/AtomicFile.pm @@ -4,22 +4,9 @@ use Moose; use IO::AtomicFile; -has 'file' => ( - is => 'ro', - isa => 'Str', - required => 1, -); - -sub load { - my ($self) = @_; - # NOTE:sv - # AtomicFile gives us no real - # benefit when reading, so why - # bother - # - SL - my $fh = IO::File->new($self->file, 'r'); - return do { local $/; <$fh>; }; -} +our $VERSION = '0.01'; + +extends 'MooseX::Storage::Engine::IO::File'; sub store { my ($self, $data) = @_; @@ -37,12 +24,12 @@ __END__ =head1 NAME -MooseX::Storage::Engine::IO::File - -=head1 SYNOPSIS +MooseX::Storage::Engine::IO::AtomicFile - The actually atomic file storage mechanism. =head1 DESCRIPTION +This provides the actual means to store data to a file atomically. + =head1 METHODS =over 4