in reply to Moose warnings

The long term solution is to report these error messages as bugs, and hope that the Moose developers fix them (or you can supply patches yourself).

In my opinion any error message from inside a module is a bug, unless it clearly states how it was being misused (or unless something external goes wrong, like IO).

Replies are listed 'Best First'.
Re^2: Moose warnings
by Corion (Patriarch) on May 06, 2010 at 14:13 UTC

    The last time I mentioned those Java-style backtraces as undesirable, the #moose folks (who used same nicknames as the Moose developers usually use) said that this was intended and that huge backtraces are what you usually want.

    I think this is a sign that Moose is enterprise-ready by cargo-culting things that Java does and telling the customer that the behaviour is what they should like.

      I think this is a sign that Moose is enterprise-ready by cargo-culting things that Java does and telling the customer that the behaviour is what they should like.

      Actually, Java makes stack traces optional, you only get them if you ask for them specifically, and people usually do ask for them since it makes debugging easier. The same is true with most any language which has first class exceptions. If I had to guess though, I would suspect that printing exception stack traces on error by default originated in Smalltalk before they showed up as optional things in Java, so you got your cargo sources wrong there.

      Additionally we are not forcing this choice on our "customers" anymore (and haven't for a very long time). You can use Moose::Error::Croak if you prefer the shorter less tedious (but also less descriptive) error messages.

      As for enterprise readiness, if a few verbose stack traces can help wear away the whole perception that Perl is dead and unmaintainable, then I am all for it ;)

      -stvn
Re^2: Moose warnings
by bobr (Monk) on May 06, 2010 at 15:04 UTC
    Thanks for thoughts, I will report them.

    I was not seeing them as bugs (the error is actually in my code), but your points make a lot of sense to me.

    -- thanks, Roman