[sf-perl] Mouse, again?

George Hartzell hartzell at alerce.com
Fri Mar 2 09:31:55 PST 2012


Dodger writes:
 > I've never found a reason to use either.
 > 
 > But even if I did I would never use them in anything intended for
 > sharing on CPAN.  
 > 
 > It's one of those "do into others" things. 
 > 
 > I hate it whenever I find a module that seems to do everything I
 > need, but it uses some other module that isn't important to its
 > functionality, but some developer liked. Like Moose. 
 > 
 > (Or ten thousand different incompatible test harnesses that I end
 > up with installed because people randomly decided all their tests
 > for a pure perl module needed to be done using
 > Test::Wankish::Obscure::Nonsense) 

Just to keep things in perspective, Moose and all of it's dependencies
installed from scratch on a macbook pro (with an SSD) in 2 minutes and
20 seconds.  Almost a minute of that time was Moose running its tests
(time cpanm -L /tmp/moose-test Moose).  It installed 22 distributions:

  Try-Tiny-0.11
  Test-Fatal-0.010
  Params-Util-1.06
  Sub-Install-0.926
  Data-OptList-0.107
  Sub-Exporter-0.982
  List-MoreUtils-0.33
  Dist-CheckConflicts-0.02
  Test-Requires-0.06
  Package-DeprecationManager-0.11
  Package-Stash-XS-0.25
  Task-Weaken-1.04
  MRO-Compat-0.11
  Package-Stash-0.33
  Module-Runtime-0.013
  Module-Implementation-0.06
  Class-Load-0.18
  Class-Load-XS-0.04
  Eval-Closure-0.08
  Sub-Name-0.05
  Devel-GlobalDestruction-0.04
  Moose-2.0402

Some of those, like List-MoreUtils are already pretty common.  Others,
like Try-Tiny are things that everyone *should* be using, unless they
understand and code for the corner cases that eval {...} if ($@) {
... } fail to catch.  Task-Weaken papers over various OS distro's
packaging misdeeds.

Naked old-school code-it-all-myself Perl isn't interesting to me.
I've found that putting some energy into learning (and leaning on) a
choice set of CPAN tools (libraries, "frameworks", whatever...) has
been well worth the investment.

One of my challenges with CPAN and Perl is to stay in the "main
channel" of the river as it flows along and not get "tricked" into
using stuff that doesn't have legs and/or that doesn't have wide
applicability.  I'm still trying to crack this, but Perl Mongers,
YAPC, and the various blogs seem to be giving me a good start.

g.


More information about the SanFrancisco-pm mailing list