Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • The first impression from the synopsis is that the syntax seems pretty comfortable.

    And from what I could tell by browsing the docs it does deal with my biggest problem with inside-out-objects: debuggability.

    With the dynamic typing in Perl, if I'm confused as to what I'm looking at it's essential to be able to dump the object data structure easily just to see what's what. I'm assuming (well, hoping) that's covered by the "Object Serialization" blurb.

    • It is covered. And provided that your class is relatively plain vanilla, the dump() method will do what you want:

      package Foo;
      use Object::InsideOut;
      my @x : Field :Acc('x') :Default('foo');
      my @y : Field :Acc('y') :Default('bar');
      my @z : Field :Acc('z') :Default('baz');

      package main;
      my $obj = Foo->new;

      use Data::Dumper;
      say Dumper $obj->dump;