Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Moose / Error / Croak.pm
CommitLineData
3fea05b9 1package Moose::Error::Croak;
2
3use strict;
4use warnings;
5
6our $VERSION = '0.93';
7$VERSION = eval $VERSION;
8our $AUTHORITY = 'cpan:STEVAN';
9
10use base qw(Moose::Error::Default);
11
12sub 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
25Moose::Error::Croak - Prefer C<croak>
26
27=head1 SYNOPSIS
28
29 # Metaclass definition must come before Moose is used.
30 use metaclass (
31 metaclass => 'Moose::Meta::Class',
32 error_class => 'Moose::Error::Croak',
33 );
34 use Moose;
35 # ...
36
37=head1 DESCRIPTION
38
39This error class uses L<Carp/croak> to raise errors generated in your
40metaclass.
41
42=head1 METHODS
43
44=over 4
45
46=item new
47
48Overrides L<Moose::Error::Default/new> to prefer C<croak>.
49
50=back
51
52=cut
53
54