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