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.
  • Do Perl programmers just stick with the "standard" or is InsideOut being used more?

    DISCLAIMER: I am biased [cpan.org], and all my "facts" come secondhand from people who have switched to Moose, so take it with a big giant grain of salt.

    I have been seeing some blowback with Inside-Out objects, mostly centered around the difficulties with dumping them and the need for them to be DESTROY-ed to properly manage them. Most of the helper modules tend to try and fix these issues, but in doing so, they tend to break the "standard" way of doing Perl OOP things. For dumping the object, it's not that bad, but all you need is one junior programmer to write DESTROY instead of DEMOLISH and your Inside-Out objects now have a memory leak. Of course 5.10 fieldhashes fix this, but not everyone is on 5.10 yet.

    Moose on the other hand, actually uses the "standard" way to build Perl objects, in the sense that by default it uses HASH references for the instance type. Because of this Moose tends to play very well with non-Moose classes that are also HASH based. Moose really just makes building "standard" Perl objects easier by doing all the tedious bits for you. If your intern writes a DESTROY method on a Moose class it will no longer run all your DEMOLISH methods, but it won't prevent your objects from getting garbage collected.

    As for some kind of measure of "popularity", thats always really difficult to discern, but best I can do is tell you what I am seeing. We are getting a lot more activity on the #moose IRC channel and the moose mailing list, and from new people too, not just the regulars. Also I regularly see Moose being discussed and suggested on the Catalyst and DBIx::Class IRC channels and mailing lists. More Moose questions are starting to pop-up on Perlmonks as well. So best I can tell the number of Moose users is growing pretty steadily for the past few months.

    I would be interested to know what the Inside-Out module authors are seeing. I know that Class::Std was revived [perl.org] recently, and Class::InsideOut and Object::InsideOut seem to be released regularly, so they do seem alive and well.

    - Stevan

    • As the author of Class::InsideOut, I would say that people should only use inside-out objects if they have a particular need for doing so and understand the implications. No one should use inside-out objects "just because" or because they think it's a best practice.

      I still refer people to my YAPC talk [dagolden.com] as a good articulation of the issues.

      I've only recently had the opportunity to work with Moose and I'm very impressed with it -- though I found a bit of a steep learning curve trying to understand type co

      • I used to worry how much magic is going on behind the scenes in the dependency chain, ...

        The most magical bit is Sub::Name, followed by some of the XS we have in Class::MOP now (only about 20-30 lines of XS in total too). And recently some of the BestPracticalistas have been looking to make a Pure Perl alternative to that as well. In general we do our very best to keep core Moose as clean and easy to install as possible, and all the crazier stuff (see also MooseX::Compile) is in a different distro.

      • (Most of the FAIL's are older Perls or places where Scalar::Util is broken, I believe).
        The comedy here is that almost all of those FAILs can be eliminated by making esoteric Test::* dependencies optional.