Acme-RightSideOutObject

 view release on metacpan or  search on metacpan

lib/Acme/RightSideOutObject.pm  view on Meta::CPAN

L<Data::Dumper>, you'll find this:

    $VAR1 = bless( do{\(my $o = undef)}, 'My::Class' );

Fear not!  Acme::RightSideOutObject to the rescue!

Acme::RightSideOutObject work exactly like the inside out object it replaces
except that it is also a hashref full of the object's instance data.
Methods may be called on it.

Options are available, mix and match style:

  use Acme::RightSideOutObject 'weaken';

Attempt not to leak so much memory. 

  use Acme::RightSideOutObject 'debug';

Print information to STDERR about instance data found while righting objects.

=head2 EXPORT

lib/Acme/RightSideOutObject.pm  view on Meta::CPAN


  -A -C -X -b 5.8.0 -c -n Acme::RightSideOutObject

=back


=head1 BUGS

Leaks memory.

Can't subclass inside out objects with right side out code (but obviously has-a style delegation works).

Should support other flavors of inside out objects than just Class::InsideOut.

Doesn't use the exporter.

The inside out object and the per-attribute hashes continue to exist; this only creates a fascade.
With some L<B> hackery, we could actually rewrite the code of inside out objects to be right side out
and utter destroy the previous inside out-edness.

=head1 SEE ALSO



( run in 0.320 second using v1.01-cache-2.11-cpan-26ccb49234f )