X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FError%2FCroak.pm;h=448ee3619e4023358c16f2f1520125c8774d2ca7;hb=HEAD;hp=29af9d17a9e14fc226480bbb93d6c5a78c45faed;hpb=ae18d5ec3c2a0c7469f9504474301e4d96abcb39;p=gitmo%2FMoose.git diff --git a/lib/Moose/Error/Croak.pm b/lib/Moose/Error/Croak.pm index 29af9d1..448ee36 100644 --- a/lib/Moose/Error/Croak.pm +++ b/lib/Moose/Error/Croak.pm @@ -3,10 +3,6 @@ package Moose::Error::Croak; use strict; use warnings; -our $VERSION = '0.61'; -$VERSION = eval $VERSION; -our $AUTHORITY = 'cpan:STEVAN'; - use base qw(Moose::Error::Default); sub new { @@ -14,22 +10,33 @@ sub new { $self->create_error_croak(@args); } -__PACKAGE__ +sub _inline_new { + my ( $self, %args ) = @_; -__END__ + my $depth = ($args{depth} || 0) - 1; + return 'Moose::Error::Util::create_error_croak(' + . 'message => ' . $args{message} . ', ' + . 'depth => ' . $depth . ', ' + . ')'; +} -=pod +1; -=head1 NAME +# ABSTRACT: Prefer C -Moose::Error::Croak - Prefer C +__END__ + +=pod =head1 SYNOPSIS - use metaclass => ( - metaclass => "Moose::Meta::Class", - error_class => "Moose::Error::Croak", + # Metaclass definition must come before Moose is used. + use metaclass ( + metaclass => 'Moose::Meta::Class', + error_class => 'Moose::Error::Croak', ); + use Moose; + # ... =head1 DESCRIPTION