Commit | Line | Data |
bf6fa6b3 |
1 | package Moose::Error::Croak; |
2 | |
c0e91e5f |
3 | use strict; |
4 | use warnings; |
5 | |
eae0508f |
6 | our $VERSION = '0.81'; |
ae18d5ec |
7 | $VERSION = eval $VERSION; |
8 | our $AUTHORITY = 'cpan:STEVAN'; |
9 | |
bf6fa6b3 |
10 | use base qw(Moose::Error::Default); |
11 | |
12 | sub new { |
13 | my ( $self, @args ) = @_; |
14 | $self->create_error_croak(@args); |
15 | } |
16 | |
17 | __PACKAGE__ |
18 | |
19 | __END__ |
20 | |
21 | =pod |
22 | |
23 | =head1 NAME |
24 | |
25 | Moose::Error::Croak - Prefer C<croak> |
26 | |
27 | =head1 SYNOPSIS |
28 | |
29 | use metaclass => ( |
30 | metaclass => "Moose::Meta::Class", |
31 | error_class => "Moose::Error::Croak", |
32 | ); |
33 | |
34 | =head1 DESCRIPTION |
35 | |
36 | This error class uses L<Carp/croak> to raise errors generated in your |
37 | metaclass. |
38 | |
39 | =head1 METHODS |
40 | |
41 | =over 4 |
42 | |
43 | =item new |
44 | |
45 | Overrides L<Moose::Error::Default/new> to prefer C<croak>. |
46 | |
47 | =back |
48 | |
49 | =cut |
50 | |
51 | |