Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 39002
Status: resolved
Priority: 0/
Queue: Moose

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: (no value)



Subject: croaks report wrong point in the stack
For example... $ perl -wle 'package Foo; use Moose; extends' Must derive at least one class at /usr/local/lib/site_perl/Moose/Exporter.pm line 173 That should report "at -e line 1" where the real user mistake occurred. This is because Carp is insufficiently smart to know where to report from. Consider using Carp::Clan which can skip all the Moose guts in the stack and report at the correct user level.
Thanks for the report... I've merged a branch that significantly cleans up error throwing in Moose and I'll make sure it handles this properly. That said, are you willing to write some failing tests?
This now (as of the upcoming 0.69 release) uses throw_error, so you'll be able to find where the original call to "extends" was. It broke when we moved to using Moose::Exporter which wraps many of our keywords. Shawn