moving MooseX::Storage
[gitmo/MooseX-Storage.git] / lib / MooseX / Storage / IO / File.pm
CommitLineData
bff7e5f7 1
2package MooseX::Storage::IO::File;
a23e18d7 3use Moose::Role;
4
4d1850a6 5use MooseX::Storage::Engine::IO::File;
6
7requires 'thaw';
8requires 'freeze';
a23e18d7 9
10sub load {
11 my ( $class, $filename ) = @_;
4d1850a6 12 $class->thaw( MooseX::Storage::Engine::IO::File->new( file => $filename )->load() );
bff7e5f7 13}
14
15sub store {
a23e18d7 16 my ( $self, $filename ) = @_;
4d1850a6 17 MooseX::Storage::Engine::IO::File->new( file => $filename )->store( $self->freeze() );
a23e18d7 18}
19
201;
21
22__END__
23
24=pod
25
ec9c1923 26=head1 NAME
27
28MooseX::Storage::IO::File
29
30=head1 SYNOPSIS
31
32=head1 DESCRIPTION
33
34=head1 METHODS
35
36=over 4
37
38=item B<load ($filename)>
39
40=item B<store ($filename)>
41
42=back
43
44=head2 Introspection
45
46=over 4
47
48=item B<meta>
49
50=back
51
52=head1 BUGS
53
54All complex software has bugs lurking in it, and this module is no
55exception. If you find a bug please either email me, or add the bug
56to cpan-RT.
57
58=head1 AUTHOR
59
60Chris Prather E<lt>chris.prather@iinteractive.comE<gt>
61
62Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
63
64=head1 COPYRIGHT AND LICENSE
65
66Copyright 2007 by Infinity Interactive, Inc.
67
68L<http://www.iinteractive.com>
69
70This library is free software; you can redistribute it and/or modify
71it under the same terms as Perl itself.
72
a23e18d7 73=cut
74
ec9c1923 75