News for hackers. Stuff that matters.
Re:Perl on Heroku by mst on Thursday February 09, 2012 @12:38PM (#3572052)
I wouldn't expect Moo to gain you much over Moose in terms of runtime performance, except in the very simple cases where Moo can use Class::XSAccessor instead of generating a perl accessor method. What you probably want instead is to profile and selectively remove type constraints - perhaps only for runtime but not for the test suite. Consider:

  package MyApp::AssertIsa;

  use strictures 1;
  use base qw(Exporter);

  our @EXPORT = qw(assert_isa);

  sub assert_isa { $ENV{SOMETHING} ? @_ : () }
and then

  use Moose;
  use MyApp::AssertIsa;

  has foo => (is => 'ro', assert_isa(isa => 'Bar'));
and flip the relevant env var for your test suite (or perhaps use one of the test harness env vars to trip it automatically for t/)

There are no comments on this comment yet.