Slash Boxes
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.
More | Login | Reply
Loading... please wait.
  • People seem to think that Inside-Out Objects are about not letting other people touch your internals.

    They aren't.

    Inside-Out Objects solve two out of three problems* I have with traditional Perl OO:

    • It's not benefitting from enabling 'strict' (that is, no compile time checking of attribute names). Now you may say "I don't care about that, I have tests", but that just means you find both 'use strict' and 'use warning' fluff - after all, you have your tests.
    • In an inheritance tree, your implemenation is
    • I've evidently been wrong about IOO. Since the major problem I've faced has traditionally been encapsulation, that was the bit I've focused on. I will have to concede all your points. I just find that virtually every IOO implementation I've seen out there has been painful to work with, so I gave up and hope that solving the major problem I have might be good enough.

      • Hmm. For me, the visible difference between hash-based and inside-out objects is turning the following:

        my $self = shift;
        $self->{ bar };

        into this:

        my $self = refaddr shift;
        $bar{ $self };

        That seems hardly painful… but then, as MJD says, people are weird about syntax.