stop closing over the method metaobject
[gitmo/Moose.git] / lib / Moose / Error / Confess.pm
CommitLineData
bf6fa6b3 1package Moose::Error::Confess;
2
c0e91e5f 3use strict;
4use warnings;
5
bf6fa6b3 6use base qw(Moose::Error::Default);
7
2f8c8480 8sub new {
9 my ( $self, @args ) = @_;
10 $self->create_error_confess(@args);
11}
12
bcc04ae1 13sub _inline_new {
14 my ( $self, @args ) = @_;
15
16 return $self->_inline_create_error_carpmess(@args, longmess => 1);
17}
18
9c1bf11e 191;
bf6fa6b3 20
ad46f524 21# ABSTRACT: Prefer C<confess>
22
bf6fa6b3 23__END__
24
25=pod
26
bf6fa6b3 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
39This error class uses L<Carp/confess> to raise errors generated in your
40metaclass.
41
42=cut
43
44
45