http://www.perlmonks.org?node_id=725363


in reply to use fields, underscores and subclasses

Perl doesn't do OO. Perl has features that allow people to build OO systems on top of Perl.

Don't use fields. Use Moose. It's a much saner way to do everything OO in Perl and gives you a gazillion other features as well.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re: use fields, underscores and subclasses

Replies are listed 'Best First'.
Re^2: use fields, underscores and subclasses
by AZed (Monk) on Nov 23, 2008 at 18:21 UTC
    Does Moose still impose that nasty compile-time penalty? It's the main reason I've been avoiding it on small projects.
      naturally

      It has gotten a lot better recently, thanks to Devel::NYTProf and several dedicated testers/benchmarks/developers.

      And if Moose is still too slow, you might want to give Mouse a look.

      -stvn
      You have small projects that need to be so fast that a 1-2s compiletime penalty is the dealbreaker?

      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?