Beginning of dzilization
[gitmo/Moose.git] / lib / Moose / Error / Confess.pm
index ede14a7..ce5ac46 100644 (file)
@@ -3,28 +3,32 @@ package Moose::Error::Confess;
 use strict;
 use warnings;
 
-our $VERSION   = '0.87';
-$VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
 use base qw(Moose::Error::Default);
 
+sub new {
+    my ( $self, @args ) = @_;
+    $self->create_error_confess(@args);
+}
+
 __PACKAGE__
 
+# ABSTRACT: Prefer C<confess>
+
 __END__
 
 =pod
 
-=head1 NAME
-
-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