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