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