Commit | Line | Data |
bff7e5f7 |
1 | |
2 | package MooseX::Storage::IO::File; |
a23e18d7 |
3 | use Moose::Role; |
4 | |
4d1850a6 |
5 | use MooseX::Storage::Engine::IO::File; |
6 | |
7 | requires 'thaw'; |
8 | requires 'freeze'; |
a23e18d7 |
9 | |
10 | sub load { |
11 | my ( $class, $filename ) = @_; |
4d1850a6 |
12 | $class->thaw( MooseX::Storage::Engine::IO::File->new( file => $filename )->load() ); |
bff7e5f7 |
13 | } |
14 | |
15 | sub store { |
a23e18d7 |
16 | my ( $self, $filename ) = @_; |
4d1850a6 |
17 | MooseX::Storage::Engine::IO::File->new( file => $filename )->store( $self->freeze() ); |
a23e18d7 |
18 | } |
19 | |
20 | 1; |
21 | |
22 | __END__ |
23 | |
24 | =pod |
25 | |
ec9c1923 |
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 | |
a23e18d7 |
73 | =cut |
74 | |
ec9c1923 |
75 | |