summaryrefslogtreecommitdiff
path: root/lib/Moose/Exception/OnlyInstancesCanBeCloned.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Moose/Exception/OnlyInstancesCanBeCloned.pm')
-rw-r--r--lib/Moose/Exception/OnlyInstancesCanBeCloned.pm19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Moose/Exception/OnlyInstancesCanBeCloned.pm b/lib/Moose/Exception/OnlyInstancesCanBeCloned.pm
new file mode 100644
index 0000000..3f0b899
--- /dev/null
+++ b/lib/Moose/Exception/OnlyInstancesCanBeCloned.pm
@@ -0,0 +1,19 @@
+package Moose::Exception::OnlyInstancesCanBeCloned;
+our $VERSION = '2.1405';
+
+use Moose;
+extends 'Moose::Exception';
+with 'Moose::Exception::Role::Class', 'Moose::Exception::Role::ParamsHash';
+
+has 'instance' => (
+ is => 'ro',
+ isa => 'Any',
+ required => 1,
+);
+
+sub _build_message {
+ my $self = shift;
+ "You can only clone instances, (".$self->instance.") is not a blessed instance";
+}
+
+1;