2 package MooseX::Storage::Engine::IO::File;
9 our $AUTHORITY = 'cpan:STEVAN';
19 my $fh = IO::File->new($self->file, 'r')
20 || confess "Unable to open file (" . $self->file . ") for loading : $!";
21 return do { local $/; <$fh>; };
25 my ($self, $data) = @_;
26 my $fh = IO::File->new($self->file, 'w')
27 || confess "Unable to open file (" . $self->file . ") for storing : $!";
28 $fh->binmode(':utf8') if utf8::is_utf8($data);
40 MooseX::Storage::Engine::IO::File - The actually file storage mechanism.
44 This provides the actual means to store data to a file.
54 =item B<store ($data)>
68 All complex software has bugs lurking in it, and this module is no
69 exception. If you find a bug please either email me, or add the bug
74 Chris Prather E<lt>chris.prather@iinteractive.comE<gt>
76 Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
78 =head1 COPYRIGHT AND LICENSE
80 Copyright 2007-2008 by Infinity Interactive, Inc.
82 L<http://www.iinteractive.com>
84 This library is free software; you can redistribute it and/or modify
85 it under the same terms as Perl itself.