oops, this was supposed to be an expression
[gitmo/Moose.git] / lib / Moose / Error / Confess.pm
index ce5ac46..c7ddf44 100644 (file)
@@ -3,8 +3,6 @@ package Moose::Error::Confess;
 use strict;
 use warnings;
 
-our $AUTHORITY = 'cpan:STEVAN';
-
 use base qw(Moose::Error::Default);
 
 sub new {
@@ -12,7 +10,17 @@ sub new {
     $self->create_error_confess(@args);
 }
 
-__PACKAGE__
+sub _inline_new {
+    my ( $self, %args ) = @_;
+
+    my $depth = ($args{depth} || 0) - 1;
+    return 'Moose::Error::Util::create_error_confess('
+      . 'message => ' . $args{message} . ', '
+      . 'depth   => ' . $depth         . ', '
+  . ')';
+}
+
+1;
 
 # ABSTRACT: Prefer C<confess>