ce5ac46f108ed64bc366e75e7e076cd9c33a483d
[gitmo/Moose.git] / lib / Moose / Error / Confess.pm
1 package Moose::Error::Confess;
2
3 use strict;
4 use warnings;
5
6 our $AUTHORITY = 'cpan:STEVAN';
7
8 use base qw(Moose::Error::Default);
9
10 sub new {
11     my ( $self, @args ) = @_;
12     $self->create_error_confess(@args);
13 }
14
15 __PACKAGE__
16
17 # ABSTRACT: Prefer C<confess>
18
19 __END__
20
21 =pod
22
23 =head1 SYNOPSIS
24
25     # Metaclass definition must come before Moose is used.
26     use metaclass (
27         metaclass => 'Moose::Meta::Class',
28         error_class => 'Moose::Error::Confess',
29     );
30     use Moose;
31     # ...
32
33 =head1 DESCRIPTION
34
35 This error class uses L<Carp/confess> to raise errors generated in your
36 metaclass.
37
38 =cut
39
40
41