in reply to Better error messages from Moo?

File it as a bug report on the Moo RT. It should certainly be feasible; Moo could keep track of the line has occurs on, then use this when evaling the constructor. I've been doing some work on improving Moo exceptions thrown from isa and coerce in the last couple of weeks, so I'd be happy to add required to the list.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

Replies are listed 'Best First'.
Re^2: Better error messages from Moo?
by szabgab (Priest) on Jun 15, 2013 at 17:13 UTC
    Actually I already sent a patch for Moo to MST using Carp::croak() instead of die(), and he already rejected it.

      That's because that wouldn't actually have been an improvement.

      What tobyink is working on will be.

      -- mst