1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
package Moose::Error::Confess;
BEGIN {
$Moose::Error::Confess::AUTHORITY = 'cpan:STEVAN';
}
{
$Moose::Error::Confess::VERSION = '2.0603';
}
use strict;
use warnings;
use base qw(Moose::Error::Default);
sub new {
my ( $self, @args ) = @_;
$self->create_error_confess(@args);
}
sub _inline_new {
my ( $self, %args ) = @_;
my $depth = ($args{depth} || 0) - 1;
return 'Moose::Error::Util::create_error_confess('
. 'message => ' . $args{message} . ', '
. 'depth => ' . $depth . ', '
. ')';
}
1;
# ABSTRACT: Prefer C<confess>
=pod
=head1 NAME
Moose::Error::Confess - Prefer C<confess>
=head1 VERSION
version 2.0603
=head1 SYNOPSIS
# Metaclass definition must come before Moose is used.
use metaclass (
metaclass => 'Moose::Meta::Class',
error_class => 'Moose::Error::Confess',
);
use Moose;
# ...
=head1 DESCRIPTION
This error class uses L<Carp/confess> to raise errors generated in your
metaclass.
=head1 AUTHOR
Moose is maintained by the Moose Cabal, along with the help of many contributors. See L<Moose/CABAL> and L<Moose/CONTRIBUTORS> for details.
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Infinity Interactive, Inc..
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
__END__
|