diff options
Diffstat (limited to 'lib/Moose/Exception/UndefinedHashKeysPassedToMethod.pm')
-rw-r--r-- | lib/Moose/Exception/UndefinedHashKeysPassedToMethod.pm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/Moose/Exception/UndefinedHashKeysPassedToMethod.pm b/lib/Moose/Exception/UndefinedHashKeysPassedToMethod.pm new file mode 100644 index 0000000..c8349bf --- /dev/null +++ b/lib/Moose/Exception/UndefinedHashKeysPassedToMethod.pm @@ -0,0 +1,24 @@ +package Moose::Exception::UndefinedHashKeysPassedToMethod; +our $VERSION = '2.1405'; + +use Moose; +extends 'Moose::Exception'; + +has 'hash_keys' => ( + is => 'ro', + isa => 'ArrayRef', + required => 1 +); + +has 'method_name' => ( + is => 'ro', + isa => 'Str', + required => 1 +); + +sub _build_message { + my $self = shift; + "Hash keys passed to ".$self->method_name." must be defined"; +} + +1; |