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