Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Better error messages from Moo?

by tobyink (Canon)
on Jun 15, 2013 at 15:55 UTC ( [id://1039133]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1039133]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2024-05-22 17:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found