1 package MooseX::Storage::Engine::IO::File;
14 my $fh = IO::File->new($self->file, 'r')
15 || confess "Unable to open file (" . $self->file . ") for loading : $!";
16 return do { local $/; <$fh>; };
20 my ($self, $data) = @_;
21 my $fh = IO::File->new($self->file, 'w')
22 || confess "Unable to open file (" . $self->file . ") for storing : $!";
23 $fh->binmode(':utf8') if utf8::is_utf8($data);
35 MooseX::Storage::Engine::IO::File - The actually file storage mechanism.
39 This provides the actual means to store data to a file.
49 =item B<store ($data)>
63 All complex software has bugs lurking in it, and this module is no
64 exception. If you find a bug please either email me, or add the bug
69 Chris Prather E<lt>chris.prather@iinteractive.comE<gt>
71 Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
73 =head1 COPYRIGHT AND LICENSE
75 Copyright 2007-2008 by Infinity Interactive, Inc.
77 L<http://www.iinteractive.com>
79 This library is free software; you can redistribute it and/or modify
80 it under the same terms as Perl itself.