changelog and version bump for 0.104
[gitmo/MooseX-InsideOut.git] / lib / MooseX / InsideOut.pm
CommitLineData
64468268 1use strict;
2use warnings;
3
4package MooseX::InsideOut;
fff3c901 5# ABSTRACT: inside-out objects with Moose
64468268 6
71d2a8c6 7use Moose ();
8use Moose::Exporter;
9use Moose::Util::MetaRole;
10use MooseX::InsideOut::Role::Meta::Instance;
11
12Moose::Exporter->setup_import_methods(
13 also => [ 'Moose' ],
14);
15
16sub init_meta {
17 shift;
18 my %p = @_;
19 Moose->init_meta(%p);
20 Moose::Util::MetaRole::apply_metaclass_roles(
21 for_class => $p{for_class},
22 instance_metaclass_roles => [ 'MooseX::InsideOut::Role::Meta::Instance' ],
fda3c8a5 23 );
fda3c8a5 24}
0a374e17 25
64468268 261;
27__END__
28
64468268 29=head1 SYNOPSIS
30
31 package My::Object;
32
fda3c8a5 33 use MooseX::InsideOut;
64468268 34
35 # ... normal Moose functionality
36 # or ...
37
38 package My::Subclass;
39
71d2a8c6 40 use MooseX::InsideOut;
fda3c8a5 41 extends 'Some::Other::Class';
64468268 42
43=head1 DESCRIPTION
44
71d2a8c6 45MooseX::InsideOut provides metaroles for inside-out objects. That is, it sets
46up attribute slot storage somewhere other than inside C<$self>. This means
47that you can extend non-Moose classes, whose internals you either don't want to
48care about or aren't hash-based.
64468268 49
71d2a8c6 50=method init_meta
64468268 51
71d2a8c6 52Apply the instance metarole necessary for inside-out storage.
64468268 53
54=head1 TODO
55
56=over
57
58=item * dumping (for debugging purposes)
59
60=item * serialization (for e.g. storable)
61
62=item * (your suggestions here)
63
64=back
65
64468268 66=cut