From: Yuval Kogman Date: Thu, 8 Oct 2009 22:12:46 +0000 (+0200) Subject: put Moosey things in %Carp::Internal X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b71c3e7e1f4d556fbb8afd94dfe36f237d7d17cf;p=gitmo%2FMoose.git put Moosey things in %Carp::Internal This suppresses details in Carp's stack dumps, which the user should not care about (Moose and Class::MOP internals) --- diff --git a/lib/Moose/Error/Default.pm b/lib/Moose/Error/Default.pm index ffb3a4b..1984811 100644 --- a/lib/Moose/Error/Default.pm +++ b/lib/Moose/Error/Default.pm @@ -9,6 +9,83 @@ our $AUTHORITY = 'cpan:STEVAN'; use Carp::Heavy; +# this list is generated using +# ack -h --output "\$1" "package\s+((?:Class::MOP|Moose)::[\\w:]+)" lib | grep -v '::Custom::' | sort -u + +$Carp::Internal{$_}++ for qw( + Class::MOP::Attribute + Class::MOP::Class + Class::MOP::Class::Immutable::Trait + Class::MOP::Deprecated + Class::MOP::Instance + Class::MOP::Method + Class::MOP::Method::Accessor + Class::MOP::Method::Constructor + Class::MOP::Method::Generated + Class::MOP::Method::Inlined + Class::MOP::Method::Wrapped + Class::MOP::Module + Class::MOP::Object + Class::MOP::Package + + Moose::Error::Confess + Moose::Error::Croak + Moose::Error::Default + Moose::Exporter + Moose::Meta::Attribute + Moose::Meta::Attribute::Native + Moose::Meta::Attribute::Native::MethodProvider::Array + Moose::Meta::Attribute::Native::MethodProvider::Bool + Moose::Meta::Attribute::Native::MethodProvider::Code + Moose::Meta::Attribute::Native::MethodProvider::Counter + Moose::Meta::Attribute::Native::MethodProvider::Hash + Moose::Meta::Attribute::Native::MethodProvider::String + Moose::Meta::Attribute::Native::Trait + Moose::Meta::Attribute::Native::Trait::Array + Moose::Meta::Attribute::Native::Trait::Bool + Moose::Meta::Attribute::Native::Trait::Code + Moose::Meta::Attribute::Native::Trait::Counter + Moose::Meta::Attribute::Native::Trait::Hash + Moose::Meta::Attribute::Native::Trait::Number + Moose::Meta::Attribute::Native::Trait::String + Moose::Meta::Class + Moose::Meta::Class::Immutable::Trait + Moose::Meta::Instance + Moose::Meta::Method + Moose::Meta::Method::Accessor + Moose::Meta::Method::Augmented + Moose::Meta::Method::Constructor + Moose::Meta::Method::Delegation + Moose::Meta::Method::Destructor + Moose::Meta::Method::Overridden + Moose::Meta::Role + Moose::Meta::Role::Application + Moose::Meta::Role::Application::RoleSummation + Moose::Meta::Role::Application::ToClass + Moose::Meta::Role::Application::ToInstance + Moose::Meta::Role::Application::ToRole + Moose::Meta::Role::Composite + Moose::Meta::Role::Method + Moose::Meta::Role::Method::Conflicting + Moose::Meta::Role::Method::Required + Moose::Meta::TypeCoercion + Moose::Meta::TypeCoercion::Union + Moose::Meta::TypeConstraint + Moose::Meta::TypeConstraint::Class + Moose::Meta::TypeConstraint::DuckType + Moose::Meta::TypeConstraint::Enum + Moose::Meta::TypeConstraint::Parameterizable + Moose::Meta::TypeConstraint::Parameterized + Moose::Meta::TypeConstraint::Registry + Moose::Meta::TypeConstraint::Role + Moose::Meta::TypeConstraint::Union + Moose::Object + Moose::Role + Moose::Util + Moose::Util::MetaRole + Moose::Util::TypeConstraints + Moose::Util::TypeConstraints::OptimizedConstraints +); sub new { my ( $self, @args ) = @_;