f8da86c04c365749d61049b5e419cf80cb2ac09f
[gitmo/MooseX-Storage.git] / lib / MooseX / Storage / IO / File.pm
1
2 package MooseX::Storage::IO::File;
3 use Moose::Role;
4
5 use MooseX::Storage::Engine::IO::File;
6
7 requires 'thaw';
8 requires 'freeze';
9
10 sub load {
11     my ( $class, $filename ) = @_;
12     $class->thaw( MooseX::Storage::Engine::IO::File->new( file => $filename )->load() );
13 }
14
15 sub store {
16     my ( $self, $filename ) = @_;
17     MooseX::Storage::Engine::IO::File->new( file => $filename )->store( $self->freeze() );
18 }
19
20 1;
21
22 __END__
23
24 =pod
25
26 =head1 NAME
27
28 MooseX::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
54 All complex software has bugs lurking in it, and this module is no 
55 exception. If you find a bug please either email me, or add the bug
56 to cpan-RT.
57
58 =head1 AUTHOR
59
60 Chris Prather E<lt>chris.prather@iinteractive.comE<gt>
61
62 Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
63
64 =head1 COPYRIGHT AND LICENSE
65
66 Copyright 2007 by Infinity Interactive, Inc.
67
68 L<http://www.iinteractive.com>
69
70 This library is free software; you can redistribute it and/or modify
71 it under the same terms as Perl itself.
72
73 =cut
74
75