use MOOSE_ERROR_STYLE rather than MOOSE_ERROR_TERSE
[gitmo/Moose.git] / lib / Moose / Error / Confess.pm
index ede14a7..bf42d98 100644 (file)
@@ -3,12 +3,17 @@ package Moose::Error::Confess;
 use strict;
 use warnings;
 
-our $VERSION   = '0.87';
+our $VERSION   = '1.15';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
 use base qw(Moose::Error::Default);
 
+sub new {
+    my ( $self, @args ) = @_;
+    $self->create_error_confess(@args);
+}
+
 __PACKAGE__
 
 __END__
@@ -21,10 +26,13 @@ Moose::Error::Confess - Prefer C<confess>
 
 =head1 SYNOPSIS
 
-       use metaclass => (
-        metaclass => "Moose::Meta::Class",
-        error_class => "Moose::Error::Confess",
+    # Metaclass definition must come before Moose is used.
+    use metaclass (
+        metaclass => 'Moose::Meta::Class',
+        error_class => 'Moose::Error::Confess',
     );
+    use Moose;
+    # ...
 
 =head1 DESCRIPTION