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