[SCM] libmessage-passing-perl Debian packaging branch, master, updated. debian/0.111-3-14-g44f6e88
Tomas Doran
bobtfish at bobtfish.net
Mon May 6 11:57:14 UTC 2013
The following commit has been merged in the master branch:
commit c53da4ab0422f7e1c09a4345e031c11f6506770c
Author: Tomas Doran <bobtfish at bobtfish.net>
Date: Sun Jun 10 18:07:09 2012 +0100
Add an ArrayOfStr type
diff --git a/lib/Message/Passing/Types.pm b/lib/Message/Passing/Types.pm
index dea5ff5..5b49659 100644
--- a/lib/Message/Passing/Types.pm
+++ b/lib/Message/Passing/Types.pm
@@ -2,7 +2,7 @@ package Message::Passing::Types;
use MooseX::Types ();
use Moose::Util::TypeConstraints;
use JSON ();
-use MooseX::Types::Moose qw/ Str HashRef /;
+use MooseX::Types::Moose qw/ Str HashRef ArrayRef /;
use MooseX::Types::Common::String qw/ NonEmptySimpleStr /;
use MooseX::Getopt;
use Try::Tiny;
@@ -15,6 +15,7 @@ use MooseX::Types -declare => [qw{
Codec_Type
Hash_from_JSON
JSON_from_Hash
+ ArrayOfStr
}];
role_type Input_Type, { role => 'Message::Passing::Role::Input' };
@@ -41,4 +42,11 @@ MooseX::Getopt::OptionTypeMap->add_option_type_to_map(
Hash_from_JSON, '=s'
);
+subtype ArrayOfStr,
+ as ArrayRef[Str];
+
+coerce ArrayOfStr,
+ from Str,
+ via { [ $_ ] };
+
1;
--
libmessage-passing-perl Debian packaging
More information about the Pkg-perl-cvs-commits
mailing list