This commit is contained in:
14
CPAN/Moose/Exception/AccessorMustReadWrite.pm
Normal file
14
CPAN/Moose/Exception/AccessorMustReadWrite.pm
Normal file
@@ -0,0 +1,14 @@
|
||||
package Moose::Exception::AccessorMustReadWrite;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::InvalidAttributeOptions';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Cannot define an accessor name on a read-only attribute, accessors are read/write";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,19 @@
|
||||
package Moose::Exception::AddParameterizableTypeTakesParameterizableType;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has 'type_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Type must be a Moose::Meta::TypeConstraint::Parameterizable not ".$self->type_name;
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
19
CPAN/Moose/Exception/AddRoleTakesAMooseMetaRoleInstance.pm
Normal file
19
CPAN/Moose/Exception/AddRoleTakesAMooseMetaRoleInstance.pm
Normal file
@@ -0,0 +1,19 @@
|
||||
package Moose::Exception::AddRoleTakesAMooseMetaRoleInstance;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Class';
|
||||
|
||||
has 'role_to_be_added' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
"Roles must be instances of Moose::Meta::Role";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
19
CPAN/Moose/Exception/AddRoleToARoleTakesAMooseMetaRole.pm
Normal file
19
CPAN/Moose/Exception/AddRoleToARoleTakesAMooseMetaRole.pm
Normal file
@@ -0,0 +1,19 @@
|
||||
package Moose::Exception::AddRoleToARoleTakesAMooseMetaRole;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Role';
|
||||
|
||||
has 'role_to_be_added' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
"Roles must be instances of Moose::Meta::Role";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
19
CPAN/Moose/Exception/ApplyTakesABlessedInstance.pm
Normal file
19
CPAN/Moose/Exception/ApplyTakesABlessedInstance.pm
Normal file
@@ -0,0 +1,19 @@
|
||||
package Moose::Exception::ApplyTakesABlessedInstance;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Role';
|
||||
|
||||
has 'param' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
"You must pass in an blessed instance";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,19 @@
|
||||
package Moose::Exception::AttachToClassNeedsAClassMOPClassInstanceOrASubclass;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Attribute';
|
||||
|
||||
has 'class' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
"You must pass a Class::MOP::Class instance (or a subclass)";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
32
CPAN/Moose/Exception/AttributeConflictInRoles.pm
Normal file
32
CPAN/Moose/Exception/AttributeConflictInRoles.pm
Normal file
@@ -0,0 +1,32 @@
|
||||
package Moose::Exception::AttributeConflictInRoles;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Role';
|
||||
|
||||
has 'second_role_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'attribute_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $role_name = $self->role_name;
|
||||
my $second_role_name = $self->second_role_name;
|
||||
my $attribute_name = $self->attribute_name;
|
||||
"Role '$role_name' has encountered an attribute conflict"
|
||||
. " while being composed into '$second_role_name'."
|
||||
. " This is a fatal error and cannot be disambiguated."
|
||||
. " The conflicting attribute is named '$attribute_name'.";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
28
CPAN/Moose/Exception/AttributeConflictInSummation.pm
Normal file
28
CPAN/Moose/Exception/AttributeConflictInSummation.pm
Normal file
@@ -0,0 +1,28 @@
|
||||
package Moose::Exception::AttributeConflictInSummation;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Role', 'Moose::Exception::Role::AttributeName';
|
||||
|
||||
has 'second_role_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
|
||||
my $role1 = $self->role_name;
|
||||
my $role2 = $self->second_role_name;
|
||||
my $attr_name = $self->attribute_name;
|
||||
|
||||
return "We have encountered an attribute conflict with '$attr_name'"
|
||||
. " during role composition. "
|
||||
. " This attribute is defined in both $role1 and $role2."
|
||||
. " This is a fatal error and cannot be disambiguated.";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,19 @@
|
||||
package Moose::Exception::AttributeExtensionIsNotSupportedInRoles;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Role';
|
||||
|
||||
has 'attribute_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
"has '+attr' is not supported in roles";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
45
CPAN/Moose/Exception/AttributeIsRequired.pm
Normal file
45
CPAN/Moose/Exception/AttributeIsRequired.pm
Normal file
@@ -0,0 +1,45 @@
|
||||
package Moose::Exception::AttributeIsRequired;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Class';
|
||||
|
||||
has 'attribute_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
documentation => "This attribute can be used for fetching attribute instance:\n".
|
||||
" my \$class = Moose::Util::find_meta( \$exception->class_name );\n".
|
||||
" my \$attribute = \$class->get_attribute( \$exception->attribute_name );\n",
|
||||
);
|
||||
|
||||
has 'attribute_init_arg' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
);
|
||||
|
||||
has 'params' => (
|
||||
is => 'ro',
|
||||
isa => 'HashRef',
|
||||
predicate => 'has_params',
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
|
||||
my $name = $self->attribute_name;
|
||||
my $msg = "Attribute ($name)";
|
||||
|
||||
my $init_arg = $self->attribute_init_arg;
|
||||
if ( defined $init_arg && $name ne $init_arg ) {
|
||||
$msg .= ", passed as ($init_arg),";
|
||||
}
|
||||
|
||||
$msg .= ' is required';
|
||||
|
||||
return $msg;
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,19 @@
|
||||
package Moose::Exception::AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Class';
|
||||
|
||||
has 'attribute' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
"Your attribute must be an instance of Class::MOP::Mixin::AttributeCore (or a subclass)";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
25
CPAN/Moose/Exception/AttributeNamesDoNotMatch.pm
Normal file
25
CPAN/Moose/Exception/AttributeNamesDoNotMatch.pm
Normal file
@@ -0,0 +1,25 @@
|
||||
package Moose::Exception::AttributeNamesDoNotMatch;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has attribute_name => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
has attribute => (
|
||||
is => 'ro',
|
||||
isa => 'Class::MOP::Attribute',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"attribute_name (".$self-> attribute_name.") does not match attribute->name (".$self->attribute->name.")";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
28
CPAN/Moose/Exception/AttributeValueIsNotAnObject.pm
Normal file
28
CPAN/Moose/Exception/AttributeValueIsNotAnObject.pm
Normal file
@@ -0,0 +1,28 @@
|
||||
package Moose::Exception::AttributeValueIsNotAnObject;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Instance', 'Moose::Exception::Role::Attribute';
|
||||
|
||||
has 'method' => (
|
||||
is => 'ro',
|
||||
isa => 'Moose::Meta::Method::Delegation',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
has 'given_value' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Cannot delegate ".$self->method->name." to "
|
||||
.$self->method->delegate_to_method." because the value of "
|
||||
. $self->attribute->name . " is not an object (got '".$self->given_value."')";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
22
CPAN/Moose/Exception/AttributeValueIsNotDefined.pm
Normal file
22
CPAN/Moose/Exception/AttributeValueIsNotDefined.pm
Normal file
@@ -0,0 +1,22 @@
|
||||
package Moose::Exception::AttributeValueIsNotDefined;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Instance', 'Moose::Exception::Role::Attribute';
|
||||
|
||||
has 'method' => (
|
||||
is => 'ro',
|
||||
isa => 'Moose::Meta::Method::Delegation',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Cannot delegate ".$self->method->name." to "
|
||||
.$self->method->delegate_to_method." because the value of "
|
||||
. $self->attribute->name . " is not defined";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
14
CPAN/Moose/Exception/AutoDeRefNeedsArrayRefOrHashRef.pm
Normal file
14
CPAN/Moose/Exception/AutoDeRefNeedsArrayRefOrHashRef.pm
Normal file
@@ -0,0 +1,14 @@
|
||||
package Moose::Exception::AutoDeRefNeedsArrayRefOrHashRef;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::InvalidAttributeOptions';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"You cannot auto-dereference anything other than a ArrayRef or HashRef on attribute (".$self->attribute_name.")";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
25
CPAN/Moose/Exception/BadOptionFormat.pm
Normal file
25
CPAN/Moose/Exception/BadOptionFormat.pm
Normal file
@@ -0,0 +1,25 @@
|
||||
package Moose::Exception::BadOptionFormat;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Attribute';
|
||||
|
||||
has 'option_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'option_value' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
"bad accessor/reader/writer/predicate/clearer format, must be a HASH ref";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
19
CPAN/Moose/Exception/BothBuilderAndDefaultAreNotAllowed.pm
Normal file
19
CPAN/Moose/Exception/BothBuilderAndDefaultAreNotAllowed.pm
Normal file
@@ -0,0 +1,19 @@
|
||||
package Moose::Exception::BothBuilderAndDefaultAreNotAllowed;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::ParamsHash';
|
||||
|
||||
has 'class' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
"Setting both default and builder is not allowed.";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
14
CPAN/Moose/Exception/BuilderDoesNotExist.pm
Normal file
14
CPAN/Moose/Exception/BuilderDoesNotExist.pm
Normal file
@@ -0,0 +1,14 @@
|
||||
package Moose::Exception::BuilderDoesNotExist;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Attribute', 'Moose::Exception::Role::Instance';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
blessed($self->instance)." does not support builder method '".$self->attribute->builder."' for attribute '".$self->attribute->name."'";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,14 @@
|
||||
package Moose::Exception::BuilderMethodNotSupportedForAttribute;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Attribute', 'Moose::Exception::Role::Instance';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
blessed($self->instance)." does not support builder method '". $self->attribute->builder ."' for attribute '" . $self->attribute->name . "'";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,26 @@
|
||||
package Moose::Exception::BuilderMethodNotSupportedForInlineAttribute;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Instance', 'Moose::Exception::Role::Class';
|
||||
|
||||
has 'attribute_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'builder' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
$self->class_name." does not support builder method '". $self->builder ."' for attribute '" . $self->attribute_name . "'";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
19
CPAN/Moose/Exception/BuilderMustBeAMethodName.pm
Normal file
19
CPAN/Moose/Exception/BuilderMustBeAMethodName.pm
Normal file
@@ -0,0 +1,19 @@
|
||||
package Moose::Exception::BuilderMustBeAMethodName;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::ParamsHash';
|
||||
|
||||
has 'class' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
"builder must be a defined scalar value which is a method name";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
19
CPAN/Moose/Exception/CallingMethodOnAnImmutableInstance.pm
Normal file
19
CPAN/Moose/Exception/CallingMethodOnAnImmutableInstance.pm
Normal file
@@ -0,0 +1,19 @@
|
||||
package Moose::Exception::CallingMethodOnAnImmutableInstance;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has 'method_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"The '".$self->method_name."' method cannot be called on an immutable instance";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,19 @@
|
||||
package Moose::Exception::CallingReadOnlyMethodOnAnImmutableInstance;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has 'method_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"The '".$self->method_name."' method is read-only when called on an immutable instance";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
15
CPAN/Moose/Exception/CanExtendOnlyClasses.pm
Normal file
15
CPAN/Moose/Exception/CanExtendOnlyClasses.pm
Normal file
@@ -0,0 +1,15 @@
|
||||
package Moose::Exception::CanExtendOnlyClasses;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Role';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $role_name = $self->role_name;
|
||||
return "You cannot inherit from a Moose Role ($role_name)";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
18
CPAN/Moose/Exception/CanOnlyConsumeRole.pm
Normal file
18
CPAN/Moose/Exception/CanOnlyConsumeRole.pm
Normal file
@@ -0,0 +1,18 @@
|
||||
package Moose::Exception::CanOnlyConsumeRole;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has 'role_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"You can only consume roles, ".$self->role_name." is not a Moose role";
|
||||
}
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
25
CPAN/Moose/Exception/CanOnlyWrapBlessedCode.pm
Normal file
25
CPAN/Moose/Exception/CanOnlyWrapBlessedCode.pm
Normal file
@@ -0,0 +1,25 @@
|
||||
package Moose::Exception::CanOnlyWrapBlessedCode;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::ParamsHash';
|
||||
|
||||
has 'class' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'code' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
"Can only wrap blessed CODE";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
15
CPAN/Moose/Exception/CanReblessOnlyIntoASubclass.pm
Normal file
15
CPAN/Moose/Exception/CanReblessOnlyIntoASubclass.pm
Normal file
@@ -0,0 +1,15 @@
|
||||
package Moose::Exception::CanReblessOnlyIntoASubclass;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::ParamsHash', 'Moose::Exception::Role::Class', 'Moose::Exception::Role::Instance', 'Moose::Exception::Role::InstanceClass';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $instance_class = $self->instance_class;
|
||||
"You may rebless only into a subclass of ($instance_class), of which (". $self->class_name .") isn't."
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
14
CPAN/Moose/Exception/CanReblessOnlyIntoASuperclass.pm
Normal file
14
CPAN/Moose/Exception/CanReblessOnlyIntoASuperclass.pm
Normal file
@@ -0,0 +1,14 @@
|
||||
package Moose::Exception::CanReblessOnlyIntoASuperclass;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Class', 'Moose::Exception::Role::Instance', 'Moose::Exception::Role::InstanceClass';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"You may rebless only into a superclass of (".blessed( $self->instance )."), of which (". $self->class_name .") isn't."
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,18 @@
|
||||
package Moose::Exception::CannotAddAdditionalTypeCoercionsToUnion;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has 'type_coercion_union_object' => (
|
||||
is => 'ro',
|
||||
isa => 'Moose::Meta::TypeCoercion::Union',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
return "Cannot add additional type coercions to Union types";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
20
CPAN/Moose/Exception/CannotAddAsAnAttributeToARole.pm
Normal file
20
CPAN/Moose/Exception/CannotAddAsAnAttributeToARole.pm
Normal file
@@ -0,0 +1,20 @@
|
||||
package Moose::Exception::CannotAddAsAnAttributeToARole;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Role';
|
||||
|
||||
has 'attribute_class' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Cannot add a ".$self->attribute_class." as an attribute to a role";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
13
CPAN/Moose/Exception/CannotApplyBaseClassRolesToRole.pm
Normal file
13
CPAN/Moose/Exception/CannotApplyBaseClassRolesToRole.pm
Normal file
@@ -0,0 +1,13 @@
|
||||
package Moose::Exception::CannotApplyBaseClassRolesToRole;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::ParamsHash', 'Moose::Exception::Role::Role';
|
||||
|
||||
sub _build_message {
|
||||
"You can only apply base class roles to a Moose class, not a role.";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
20
CPAN/Moose/Exception/CannotAssignValueToReadOnlyAccessor.pm
Normal file
20
CPAN/Moose/Exception/CannotAssignValueToReadOnlyAccessor.pm
Normal file
@@ -0,0 +1,20 @@
|
||||
package Moose::Exception::CannotAssignValueToReadOnlyAccessor;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Class', 'Moose::Exception::Role::EitherAttributeOrAttributeName';
|
||||
|
||||
has 'value' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Cannot assign a value to a read-only accessor";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
13
CPAN/Moose/Exception/CannotAugmentIfLocalMethodPresent.pm
Normal file
13
CPAN/Moose/Exception/CannotAugmentIfLocalMethodPresent.pm
Normal file
@@ -0,0 +1,13 @@
|
||||
package Moose::Exception::CannotAugmentIfLocalMethodPresent;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Class', 'Moose::Exception::Role::Method';
|
||||
|
||||
sub _build_message {
|
||||
"Cannot add an augment method if a local method is already present";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
26
CPAN/Moose/Exception/CannotAugmentNoSuperMethod.pm
Normal file
26
CPAN/Moose/Exception/CannotAugmentNoSuperMethod.pm
Normal file
@@ -0,0 +1,26 @@
|
||||
package Moose::Exception::CannotAugmentNoSuperMethod;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::ParamsHash';
|
||||
|
||||
has 'class' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'method_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"You cannot augment '".$self->method_name."' because it has no super method";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
14
CPAN/Moose/Exception/CannotAutoDerefWithoutIsa.pm
Normal file
14
CPAN/Moose/Exception/CannotAutoDerefWithoutIsa.pm
Normal file
@@ -0,0 +1,14 @@
|
||||
package Moose::Exception::CannotAutoDerefWithoutIsa;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::InvalidAttributeOptions';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"You cannot auto-dereference without specifying a type constraint on attribute (".$self->attribute_name.")";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
14
CPAN/Moose/Exception/CannotAutoDereferenceTypeConstraint.pm
Normal file
14
CPAN/Moose/Exception/CannotAutoDereferenceTypeConstraint.pm
Normal file
@@ -0,0 +1,14 @@
|
||||
package Moose::Exception::CannotAutoDereferenceTypeConstraint;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Attribute', 'Moose::Exception::Role::Instance', 'Moose::Exception::Role::TypeConstraint';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Can not auto de-reference the type constraint '" . $self->type_name . "'";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
14
CPAN/Moose/Exception/CannotCalculateNativeType.pm
Normal file
14
CPAN/Moose/Exception/CannotCalculateNativeType.pm
Normal file
@@ -0,0 +1,14 @@
|
||||
package Moose::Exception::CannotCalculateNativeType;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Instance';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Cannot calculate native type for " . ref $self->instance;
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
19
CPAN/Moose/Exception/CannotCallAnAbstractBaseMethod.pm
Normal file
19
CPAN/Moose/Exception/CannotCallAnAbstractBaseMethod.pm
Normal file
@@ -0,0 +1,19 @@
|
||||
package Moose::Exception::CannotCallAnAbstractBaseMethod;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has 'package_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
$self->package_name. " is an abstract base class, you must provide a constructor.";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
12
CPAN/Moose/Exception/CannotCallAnAbstractMethod.pm
Normal file
12
CPAN/Moose/Exception/CannotCallAnAbstractMethod.pm
Normal file
@@ -0,0 +1,12 @@
|
||||
package Moose::Exception::CannotCallAnAbstractMethod;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
sub _build_message {
|
||||
"Abstract method";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
14
CPAN/Moose/Exception/CannotCoerceAWeakRef.pm
Normal file
14
CPAN/Moose/Exception/CannotCoerceAWeakRef.pm
Normal file
@@ -0,0 +1,14 @@
|
||||
package Moose::Exception::CannotCoerceAWeakRef;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::InvalidAttributeOptions';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"You cannot have a weak reference to a coerced value on attribute (".$self->attribute_name.")";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,17 @@
|
||||
package Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::InvalidAttributeOptions', 'Moose::Exception::Role::TypeConstraint';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $name = $self->attribute_name;
|
||||
my $type = $self->type_name;
|
||||
|
||||
return "You cannot coerce an attribute ($name) unless its type ($type) has a coercion";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,13 @@
|
||||
package Moose::Exception::CannotCreateHigherOrderTypeWithoutATypeParameter;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::TypeConstraint';
|
||||
|
||||
sub _build_message {
|
||||
"You cannot create a Higher Order type without a type parameter";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,25 @@
|
||||
package Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresent;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Role', 'Moose::Exception::Role::Method';
|
||||
|
||||
has 'role_being_applied_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'aliased_method_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
"Cannot create a method alias if a local method of the same name exists";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,19 @@
|
||||
package Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresentInClass;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Role', 'Moose::Exception::Role::Method', 'Moose::Exception::Role::Class';
|
||||
|
||||
has 'aliased_method_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
"Cannot create a method alias if a local method of the same name exists";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
14
CPAN/Moose/Exception/CannotDelegateLocalMethodIsPresent.pm
Normal file
14
CPAN/Moose/Exception/CannotDelegateLocalMethodIsPresent.pm
Normal file
@@ -0,0 +1,14 @@
|
||||
package Moose::Exception::CannotDelegateLocalMethodIsPresent;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Attribute', 'Moose::Exception::Role::Method';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"You cannot overwrite a locally defined method (".$self->method->name.") with a delegation";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
13
CPAN/Moose/Exception/CannotDelegateWithoutIsa.pm
Normal file
13
CPAN/Moose/Exception/CannotDelegateWithoutIsa.pm
Normal file
@@ -0,0 +1,13 @@
|
||||
package Moose::Exception::CannotDelegateWithoutIsa;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Attribute';
|
||||
|
||||
sub _build_message {
|
||||
"Cannot delegate methods based on a Regexp without a type constraint (isa)";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
14
CPAN/Moose/Exception/CannotFindDelegateMetaclass.pm
Normal file
14
CPAN/Moose/Exception/CannotFindDelegateMetaclass.pm
Normal file
@@ -0,0 +1,14 @@
|
||||
package Moose::Exception::CannotFindDelegateMetaclass;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Attribute';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Cannot find delegate metaclass for attribute ".$self->attribute->name;
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
19
CPAN/Moose/Exception/CannotFindType.pm
Normal file
19
CPAN/Moose/Exception/CannotFindType.pm
Normal file
@@ -0,0 +1,19 @@
|
||||
package Moose::Exception::CannotFindType;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has 'type_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Cannot find type '".$self->type_name."', perhaps you forgot to load it";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
33
CPAN/Moose/Exception/CannotFindTypeGivenToMatchOnType.pm
Normal file
33
CPAN/Moose/Exception/CannotFindTypeGivenToMatchOnType.pm
Normal file
@@ -0,0 +1,33 @@
|
||||
package Moose::Exception::CannotFindTypeGivenToMatchOnType;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has 'to_match' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'action' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'type' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $type = $self->type;
|
||||
|
||||
return "Cannot find or parse the type '$type'"
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
26
CPAN/Moose/Exception/CannotFixMetaclassCompatibility.pm
Normal file
26
CPAN/Moose/Exception/CannotFixMetaclassCompatibility.pm
Normal file
@@ -0,0 +1,26 @@
|
||||
package Moose::Exception::CannotFixMetaclassCompatibility;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Class';
|
||||
|
||||
has 'superclass' => (
|
||||
is => 'ro',
|
||||
isa => 'Object',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'metaclass_type' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $class_name = $self->class_name;
|
||||
"Can't fix metaclass incompatibility for $class_name because it is not pristine.";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
30
CPAN/Moose/Exception/CannotGenerateInlineConstraint.pm
Normal file
30
CPAN/Moose/Exception/CannotGenerateInlineConstraint.pm
Normal file
@@ -0,0 +1,30 @@
|
||||
package Moose::Exception::CannotGenerateInlineConstraint;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::TypeConstraint';
|
||||
|
||||
has 'parameterizable_type_object_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
documentation => "This attribute can be used for fetching parameterizable type constraint(Moose::Meta::TypeConstraint::Parameterizable):\n".
|
||||
" my \$type_constraint = Moose::Util::TypeConstraints::find_type_constraint( \$exception->type_name );\n",
|
||||
);
|
||||
|
||||
has 'value' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $type = $self->type_name;
|
||||
|
||||
return "Can't generate an inline constraint for $type, since none was defined";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,30 @@
|
||||
package Moose::Exception::CannotInitializeMooseMetaRoleComposite;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has 'role_composite' => (
|
||||
is => 'ro',
|
||||
isa => 'Moose::Meta::Role::Composite',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'old_meta' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'args' => (
|
||||
is => 'ro',
|
||||
isa => 'ArrayRef',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
'Moose::Meta::Role::Composite instances can only be reinitialized from an existing metaclass instance';
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
14
CPAN/Moose/Exception/CannotInlineTypeConstraintCheck.pm
Normal file
14
CPAN/Moose/Exception/CannotInlineTypeConstraintCheck.pm
Normal file
@@ -0,0 +1,14 @@
|
||||
package Moose::Exception::CannotInlineTypeConstraintCheck;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::TypeConstraint';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
'Cannot inline a type constraint check for ' . $self->type_name;
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
41
CPAN/Moose/Exception/CannotLocatePackageInINC.pm
Normal file
41
CPAN/Moose/Exception/CannotLocatePackageInINC.pm
Normal file
@@ -0,0 +1,41 @@
|
||||
package Moose::Exception::CannotLocatePackageInINC;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::ParamsHash';
|
||||
|
||||
has 'INC' => (
|
||||
is => 'ro',
|
||||
isa => 'ArrayRef',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'possible_packages' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'metaclass_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'type' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $possible_packages = $self->possible_packages;
|
||||
my @inc = @{$self->INC};
|
||||
|
||||
return "Can't locate $possible_packages in \@INC (\@INC contains: @INC)."
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
23
CPAN/Moose/Exception/CannotMakeMetaclassCompatible.pm
Normal file
23
CPAN/Moose/Exception/CannotMakeMetaclassCompatible.pm
Normal file
@@ -0,0 +1,23 @@
|
||||
package Moose::Exception::CannotMakeMetaclassCompatible;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Class';
|
||||
|
||||
has 'superclass_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $class_name = $self->class_name;
|
||||
my $superclass = $self->superclass_name;
|
||||
|
||||
return "Can't make $class_name compatible with metaclass $superclass";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
20
CPAN/Moose/Exception/CannotOverrideALocalMethod.pm
Normal file
20
CPAN/Moose/Exception/CannotOverrideALocalMethod.pm
Normal file
@@ -0,0 +1,20 @@
|
||||
package Moose::Exception::CannotOverrideALocalMethod;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Role';
|
||||
|
||||
has 'method_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Cannot add an override of method '".$self->method_name."' because there is a local version of '".$self->method_name."'";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
19
CPAN/Moose/Exception/CannotOverrideBodyOfMetaMethods.pm
Normal file
19
CPAN/Moose/Exception/CannotOverrideBodyOfMetaMethods.pm
Normal file
@@ -0,0 +1,19 @@
|
||||
package Moose::Exception::CannotOverrideBodyOfMetaMethods;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::ParamsHash';
|
||||
|
||||
has 'class' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
"Overriding the body of meta methods is not allowed";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
13
CPAN/Moose/Exception/CannotOverrideLocalMethodIsPresent.pm
Normal file
13
CPAN/Moose/Exception/CannotOverrideLocalMethodIsPresent.pm
Normal file
@@ -0,0 +1,13 @@
|
||||
package Moose::Exception::CannotOverrideLocalMethodIsPresent;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Class', 'Moose::Exception::Role::Method';
|
||||
|
||||
sub _build_message {
|
||||
"Cannot add an override method if a local method is already present";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
26
CPAN/Moose/Exception/CannotOverrideNoSuperMethod.pm
Normal file
26
CPAN/Moose/Exception/CannotOverrideNoSuperMethod.pm
Normal file
@@ -0,0 +1,26 @@
|
||||
package Moose::Exception::CannotOverrideNoSuperMethod;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::ParamsHash';
|
||||
|
||||
has 'method_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'class' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"You cannot override '".$self->method_name."' because it has no super method";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
12
CPAN/Moose/Exception/CannotRegisterUnnamedTypeConstraint.pm
Normal file
12
CPAN/Moose/Exception/CannotRegisterUnnamedTypeConstraint.pm
Normal file
@@ -0,0 +1,12 @@
|
||||
package Moose::Exception::CannotRegisterUnnamedTypeConstraint;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
sub _build_message {
|
||||
"can't register an unnamed type constraint";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,14 @@
|
||||
package Moose::Exception::CannotUseLazyBuildAndDefaultSimultaneously;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::InvalidAttributeOptions';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"You can not use lazy_build and default for the same attribute (".$self->attribute_name.")";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
31
CPAN/Moose/Exception/CircularReferenceInAlso.pm
Normal file
31
CPAN/Moose/Exception/CircularReferenceInAlso.pm
Normal file
@@ -0,0 +1,31 @@
|
||||
package Moose::Exception::CircularReferenceInAlso;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has 'also_parameter' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'stack' => (
|
||||
is => 'ro',
|
||||
isa => 'ArrayRef',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $also_member = $self->also_parameter;
|
||||
|
||||
my @stack = @{$self->stack};
|
||||
my $existing_stack = join( ', ', @stack);
|
||||
|
||||
return "Circular reference in 'also' parameter to Moose::Exporter between "
|
||||
."$existing_stack and $also_member";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
22
CPAN/Moose/Exception/ClassDoesNotHaveInitMeta.pm
Normal file
22
CPAN/Moose/Exception/ClassDoesNotHaveInitMeta.pm
Normal file
@@ -0,0 +1,22 @@
|
||||
package Moose::Exception::ClassDoesNotHaveInitMeta;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Class';
|
||||
|
||||
has 'traits' => (
|
||||
is => 'ro',
|
||||
isa => 'ArrayRef',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $class = $self->class_name;
|
||||
|
||||
return "Cannot provide traits when $class does not have an init_meta() method";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
22
CPAN/Moose/Exception/ClassDoesTheExcludedRole.pm
Normal file
22
CPAN/Moose/Exception/ClassDoesTheExcludedRole.pm
Normal file
@@ -0,0 +1,22 @@
|
||||
package Moose::Exception::ClassDoesTheExcludedRole;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Role', 'Moose::Exception::Role::Class';
|
||||
|
||||
has 'excluded_role_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $excluded_role_name = $self->excluded_role_name;
|
||||
my $class_name = $self->class_name;
|
||||
return "The class $class_name does the excluded role '$excluded_role_name'";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
25
CPAN/Moose/Exception/ClassNamesDoNotMatch.pm
Normal file
25
CPAN/Moose/Exception/ClassNamesDoNotMatch.pm
Normal file
@@ -0,0 +1,25 @@
|
||||
package Moose::Exception::ClassNamesDoNotMatch;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has class_name => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
has class => (
|
||||
is => 'ro',
|
||||
isa => 'Class::MOP::Class',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"class_name (".$self-> class_name.") does not match class->name (".$self->class->name.")";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,20 @@
|
||||
package Moose::Exception::CloneObjectExpectsAnInstanceOfMetaclass;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Class';
|
||||
|
||||
has 'instance' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"You must pass an instance of the metaclass (" .$self->class_name. "), not (".$self->instance.")";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
13
CPAN/Moose/Exception/CodeBlockMustBeACodeRef.pm
Normal file
13
CPAN/Moose/Exception/CodeBlockMustBeACodeRef.pm
Normal file
@@ -0,0 +1,13 @@
|
||||
package Moose::Exception::CodeBlockMustBeACodeRef;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::ParamsHash', 'Moose::Exception::Role::Instance';
|
||||
|
||||
sub _build_message {
|
||||
"Your code block must be a CODE reference";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
12
CPAN/Moose/Exception/CoercingWithoutCoercions.pm
Normal file
12
CPAN/Moose/Exception/CoercingWithoutCoercions.pm
Normal file
@@ -0,0 +1,12 @@
|
||||
package Moose::Exception::CoercingWithoutCoercions;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::TypeConstraint';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Cannot coerce without a type coercion";
|
||||
}
|
||||
1;
|
||||
20
CPAN/Moose/Exception/CoercionAlreadyExists.pm
Normal file
20
CPAN/Moose/Exception/CoercionAlreadyExists.pm
Normal file
@@ -0,0 +1,20 @@
|
||||
package Moose::Exception::CoercionAlreadyExists;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Instance';
|
||||
|
||||
has 'constraint_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"A coercion action already exists for '".$self->constraint_name."'";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
14
CPAN/Moose/Exception/CoercionNeedsTypeConstraint.pm
Normal file
14
CPAN/Moose/Exception/CoercionNeedsTypeConstraint.pm
Normal file
@@ -0,0 +1,14 @@
|
||||
package Moose::Exception::CoercionNeedsTypeConstraint;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::InvalidAttributeOptions';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"You cannot have coercion without specifying a type constraint on attribute (".$self->attribute_name.")";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,22 @@
|
||||
package Moose::Exception::ConflictDetectedInCheckRoleExclusions;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Role';
|
||||
|
||||
has 'excluded_role_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $role_name = $self->role_name;
|
||||
my $excluded_role_name = $self->excluded_role_name;
|
||||
return "Conflict detected: $role_name excludes role '$excluded_role_name'";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,16 @@
|
||||
package Moose::Exception::ConflictDetectedInCheckRoleExclusionsInToClass;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Class', 'Moose::Exception::Role::Role';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $class_name = $self->class_name;
|
||||
my $role_name = $self->role_name;
|
||||
return "Conflict detected: $class_name excludes role '$role_name'";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,12 @@
|
||||
package Moose::Exception::ConstructClassInstanceTakesPackageName;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
sub _build_message {
|
||||
"You must pass a package name";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
32
CPAN/Moose/Exception/CouldNotCreateMethod.pm
Normal file
32
CPAN/Moose/Exception/CouldNotCreateMethod.pm
Normal file
@@ -0,0 +1,32 @@
|
||||
package Moose::Exception::CouldNotCreateMethod;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Attribute';
|
||||
|
||||
has 'option_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'option_value' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'error' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Could not create the '".$self->option_name."' method for " . $self->attribute->name . " because : ".$self->error;
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
24
CPAN/Moose/Exception/CouldNotCreateWriter.pm
Normal file
24
CPAN/Moose/Exception/CouldNotCreateWriter.pm
Normal file
@@ -0,0 +1,24 @@
|
||||
package Moose::Exception::CouldNotCreateWriter;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::EitherAttributeOrAttributeName', 'Moose::Exception::Role::Instance';
|
||||
|
||||
has 'error' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $error = $self->error;
|
||||
my $attribute_name = $self->attribute_name;
|
||||
|
||||
return "Could not create writer for '$attribute_name' "
|
||||
. "because $error";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
34
CPAN/Moose/Exception/CouldNotEvalConstructor.pm
Normal file
34
CPAN/Moose/Exception/CouldNotEvalConstructor.pm
Normal file
@@ -0,0 +1,34 @@
|
||||
package Moose::Exception::CouldNotEvalConstructor;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has 'constructor_method' => (
|
||||
is => 'ro',
|
||||
isa => 'Class::MOP::Method::Constructor',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'source' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'error' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $error = $self->error;
|
||||
my $source = $self->source;
|
||||
|
||||
return "Could not eval the constructor :\n\n$source\n\nbecause :\n\n$error";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
34
CPAN/Moose/Exception/CouldNotEvalDestructor.pm
Normal file
34
CPAN/Moose/Exception/CouldNotEvalDestructor.pm
Normal file
@@ -0,0 +1,34 @@
|
||||
package Moose::Exception::CouldNotEvalDestructor;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has 'method_destructor_object' => (
|
||||
is => 'ro',
|
||||
isa => 'Moose::Meta::Method::Destructor',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'source' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'error' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $error = $self->error;
|
||||
my $source = $self->source;
|
||||
|
||||
return "Could not eval the destructor :\n\n$source\n\nbecause :\n\n$error";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,20 @@
|
||||
package Moose::Exception::CouldNotFindTypeConstraintToCoerceFrom;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Instance';
|
||||
|
||||
has 'constraint_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Could not find the type constraint (".$self->constraint_name.") to coerce from";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,26 @@
|
||||
package Moose::Exception::CouldNotGenerateInlineAttributeMethod;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Instance';
|
||||
|
||||
has 'option' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'error' => (
|
||||
is => 'ro',
|
||||
isa => 'Str|Moose::Exception',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Could not generate inline ".$self->option." because : ".$self->error;
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
14
CPAN/Moose/Exception/CouldNotLocateTypeConstraintForUnion.pm
Normal file
14
CPAN/Moose/Exception/CouldNotLocateTypeConstraintForUnion.pm
Normal file
@@ -0,0 +1,14 @@
|
||||
package Moose::Exception::CouldNotLocateTypeConstraintForUnion;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::TypeConstraint';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Could not locate type constraint (".$self->type_name.") for the union";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
30
CPAN/Moose/Exception/CouldNotParseType.pm
Normal file
30
CPAN/Moose/Exception/CouldNotParseType.pm
Normal file
@@ -0,0 +1,30 @@
|
||||
package Moose::Exception::CouldNotParseType;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has 'type' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'position' => (
|
||||
is => 'ro',
|
||||
isa => 'Int',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $type = $self->type;
|
||||
my $length = length($type);
|
||||
my $position = $self->position;
|
||||
|
||||
return "'$type' didn't parse (parse-pos=$position"
|
||||
. " and str-length=$length)";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,13 @@
|
||||
package Moose::Exception::CreateMOPClassTakesArrayRefOfAttributes;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::RoleForCreateMOPClass';
|
||||
|
||||
sub _build_message {
|
||||
"You must pass an ARRAY ref of attributes";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,13 @@
|
||||
package Moose::Exception::CreateMOPClassTakesArrayRefOfSuperclasses;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::RoleForCreateMOPClass';
|
||||
|
||||
sub _build_message {
|
||||
"You must pass an ARRAY ref of superclasses";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
13
CPAN/Moose/Exception/CreateMOPClassTakesHashRefOfMethods.pm
Normal file
13
CPAN/Moose/Exception/CreateMOPClassTakesHashRefOfMethods.pm
Normal file
@@ -0,0 +1,13 @@
|
||||
package Moose::Exception::CreateMOPClassTakesHashRefOfMethods;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::RoleForCreateMOPClass';
|
||||
|
||||
sub _build_message {
|
||||
"You must pass an HASH ref of methods";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
13
CPAN/Moose/Exception/CreateTakesArrayRefOfRoles.pm
Normal file
13
CPAN/Moose/Exception/CreateTakesArrayRefOfRoles.pm
Normal file
@@ -0,0 +1,13 @@
|
||||
package Moose::Exception::CreateTakesArrayRefOfRoles;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::RoleForCreate';
|
||||
|
||||
sub _build_message {
|
||||
"You must pass an ARRAY ref of roles";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
13
CPAN/Moose/Exception/CreateTakesHashRefOfAttributes.pm
Normal file
13
CPAN/Moose/Exception/CreateTakesHashRefOfAttributes.pm
Normal file
@@ -0,0 +1,13 @@
|
||||
package Moose::Exception::CreateTakesHashRefOfAttributes;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::RoleForCreate';
|
||||
|
||||
sub _build_message {
|
||||
"You must pass a HASH ref of attributes";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
13
CPAN/Moose/Exception/CreateTakesHashRefOfMethods.pm
Normal file
13
CPAN/Moose/Exception/CreateTakesHashRefOfMethods.pm
Normal file
@@ -0,0 +1,13 @@
|
||||
package Moose::Exception::CreateTakesHashRefOfMethods;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::RoleForCreate';
|
||||
|
||||
sub _build_message {
|
||||
"You must pass a HASH ref of methods";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
33
CPAN/Moose/Exception/DefaultToMatchOnTypeMustBeCodeRef.pm
Normal file
33
CPAN/Moose/Exception/DefaultToMatchOnTypeMustBeCodeRef.pm
Normal file
@@ -0,0 +1,33 @@
|
||||
package Moose::Exception::DefaultToMatchOnTypeMustBeCodeRef;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has 'to_match' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'default_action' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'cases_to_be_matched' => (
|
||||
is => 'ro',
|
||||
isa => 'ArrayRef',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $default = $self->default_action;
|
||||
|
||||
return "Default case must be a CODE ref, not $default";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
20
CPAN/Moose/Exception/DelegationToAClassWhichIsNotLoaded.pm
Normal file
20
CPAN/Moose/Exception/DelegationToAClassWhichIsNotLoaded.pm
Normal file
@@ -0,0 +1,20 @@
|
||||
package Moose::Exception::DelegationToAClassWhichIsNotLoaded;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Attribute';
|
||||
|
||||
has 'class_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"The ".$self->attribute->name." attribute is trying to delegate to a class which has not been loaded - ".$self->class_name;
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
20
CPAN/Moose/Exception/DelegationToARoleWhichIsNotLoaded.pm
Normal file
20
CPAN/Moose/Exception/DelegationToARoleWhichIsNotLoaded.pm
Normal file
@@ -0,0 +1,20 @@
|
||||
package Moose::Exception::DelegationToARoleWhichIsNotLoaded;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Attribute';
|
||||
|
||||
has 'role_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"The ".$self->attribute->name." attribute is trying to delegate to a role which has not been loaded - ".$self->role_name;
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
14
CPAN/Moose/Exception/DelegationToATypeWhichIsNotAClass.pm
Normal file
14
CPAN/Moose/Exception/DelegationToATypeWhichIsNotAClass.pm
Normal file
@@ -0,0 +1,14 @@
|
||||
package Moose::Exception::DelegationToATypeWhichIsNotAClass;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Attribute';
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"The ".$self->attribute->name." attribute is trying to delegate to a type (".$self->attribute->type_constraint->name.") that is not backed by a class";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
13
CPAN/Moose/Exception/DoesRequiresRoleName.pm
Normal file
13
CPAN/Moose/Exception/DoesRequiresRoleName.pm
Normal file
@@ -0,0 +1,13 @@
|
||||
package Moose::Exception::DoesRequiresRoleName;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Class';
|
||||
|
||||
sub _build_message {
|
||||
"You must supply a role name to does()";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
@@ -0,0 +1,24 @@
|
||||
package Moose::Exception::EnumCalledWithAnArrayRefAndAdditionalArgs;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has 'array' => (
|
||||
is => 'ro',
|
||||
isa => 'ArrayRef',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'args' => (
|
||||
is => 'ro',
|
||||
isa => 'ArrayRef',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
"enum called with an array reference and additional arguments. Did you mean to parenthesize the enum call's parameters?";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
26
CPAN/Moose/Exception/EnumValuesMustBeString.pm
Normal file
26
CPAN/Moose/Exception/EnumValuesMustBeString.pm
Normal file
@@ -0,0 +1,26 @@
|
||||
package Moose::Exception::EnumValuesMustBeString;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::ParamsHash';
|
||||
|
||||
has 'class' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
has 'value' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Enum values must be strings, not ".( defined $self->value ? "'".$self->value."'" : "undef" );
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
13
CPAN/Moose/Exception/ExtendsMissingArgs.pm
Normal file
13
CPAN/Moose/Exception/ExtendsMissingArgs.pm
Normal file
@@ -0,0 +1,13 @@
|
||||
package Moose::Exception::ExtendsMissingArgs;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Class';
|
||||
|
||||
sub _build_message {
|
||||
"Must derive at least one class";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
20
CPAN/Moose/Exception/HandlesMustBeAHashRef.pm
Normal file
20
CPAN/Moose/Exception/HandlesMustBeAHashRef.pm
Normal file
@@ -0,0 +1,20 @@
|
||||
package Moose::Exception::HandlesMustBeAHashRef;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Instance';
|
||||
|
||||
has 'given_handles' => (
|
||||
is => 'ro',
|
||||
isa => 'Any',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"The 'handles' option must be a HASH reference, not ".$self->given_handles;
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
23
CPAN/Moose/Exception/IllegalInheritedOptions.pm
Normal file
23
CPAN/Moose/Exception/IllegalInheritedOptions.pm
Normal file
@@ -0,0 +1,23 @@
|
||||
package Moose::Exception::IllegalInheritedOptions;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::ParamsHash';
|
||||
|
||||
has 'illegal_options' => (
|
||||
is => 'ro',
|
||||
traits => ['Array'],
|
||||
handles => {
|
||||
_join_options => 'join',
|
||||
},
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Illegal inherited options => (".$self->_join_options(', ').")";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
31
CPAN/Moose/Exception/IllegalMethodTypeToAddMethodModifier.pm
Normal file
31
CPAN/Moose/Exception/IllegalMethodTypeToAddMethodModifier.pm
Normal file
@@ -0,0 +1,31 @@
|
||||
package Moose::Exception::IllegalMethodTypeToAddMethodModifier;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
|
||||
has 'class_or_object' => (
|
||||
is => 'ro',
|
||||
isa => "Any",
|
||||
required => 1,
|
||||
);
|
||||
|
||||
has 'params' => (
|
||||
is => 'ro',
|
||||
isa => 'ArrayRef',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
has 'modifier_name' => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
"Methods passed to ".$self->modifier_name." must be provided as a list, arrayref or regex, not ".$self->params->[0];
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
27
CPAN/Moose/Exception/IncompatibleMetaclassOfSuperclass.pm
Normal file
27
CPAN/Moose/Exception/IncompatibleMetaclassOfSuperclass.pm
Normal file
@@ -0,0 +1,27 @@
|
||||
package Moose::Exception::IncompatibleMetaclassOfSuperclass;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::Class';
|
||||
|
||||
has [qw/superclass_name superclass_meta_type class_meta_type/] => (
|
||||
is => 'ro',
|
||||
isa => 'Str',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
sub _build_message {
|
||||
my $self = shift;
|
||||
my $class_name = $self->class_name;
|
||||
my $class_meta_type = $self->class_meta_type;
|
||||
my $superclass_name = $self->superclass_name;
|
||||
my $supermeta_type = $self->superclass_meta_type;
|
||||
|
||||
return "The metaclass of $class_name ($class_meta_type)" .
|
||||
" is not compatible with the metaclass of its superclass, " .
|
||||
"$superclass_name ($supermeta_type)";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
13
CPAN/Moose/Exception/InitMetaRequiresClass.pm
Normal file
13
CPAN/Moose/Exception/InitMetaRequiresClass.pm
Normal file
@@ -0,0 +1,13 @@
|
||||
package Moose::Exception::InitMetaRequiresClass;
|
||||
our $VERSION = '2.2207';
|
||||
|
||||
use Moose;
|
||||
extends 'Moose::Exception';
|
||||
with 'Moose::Exception::Role::ParamsHash';
|
||||
|
||||
sub _build_message {
|
||||
"Cannot call init_meta without specifying a for_class";
|
||||
}
|
||||
|
||||
__PACKAGE__->meta->make_immutable;
|
||||
1;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user