<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package Moose::Error::Croak;
BEGIN {
  $Moose::Error::Croak::AUTHORITY = 'cpan:STEVAN';
}
{
  $Moose::Error::Croak::VERSION = '2.0603';
}

use strict;
use warnings;

use base qw(Moose::Error::Default);

sub new {
    my ( $self, @args ) = @_;
    $self-&gt;create_error_croak(@args);
}

sub _inline_new {
    my ( $self, %args ) = @_;

    my $depth = ($args{depth} || 0) - 1;
    return 'Moose::Error::Util::create_error_croak('
      . 'message =&gt; ' . $args{message} . ', '
      . 'depth   =&gt; ' . $depth         . ', '
  . ')';
}

1;

# ABSTRACT: Prefer C&lt;croak&gt;



=pod

=head1 NAME

Moose::Error::Croak - Prefer C&lt;croak&gt;

=head1 VERSION

version 2.0603

=head1 SYNOPSIS

    # Metaclass definition must come before Moose is used.
    use metaclass (
        metaclass =&gt; 'Moose::Meta::Class',
        error_class =&gt; 'Moose::Error::Croak',
    );
    use Moose;
    # ...

=head1 DESCRIPTION

This error class uses L&lt;Carp/croak&gt; to raise errors generated in your
metaclass.

=head1 METHODS

=over 4

=item new

Overrides L&lt;Moose::Error::Default/new&gt; to prefer C&lt;croak&gt;.

=back

=head1 AUTHOR

Moose is maintained by the Moose Cabal, along with the help of many contributors. See L&lt;Moose/CABAL&gt; and L&lt;Moose/CONTRIBUTORS&gt; 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__



</pre></body></html>