| 1 | # | ||
| 2 | # This file is part of Net-Gandi | ||
| 3 | # | ||
| 4 | # This software is copyright (c) 2012 by Natal Ngétal. | ||
| 5 | # | ||
| 6 | # This is free software; you can redistribute it and/or modify it under | ||
| 7 | # the same terms as the Perl 5 programming language system itself. | ||
| 8 | # | ||
| 9 | package Net::Gandi::Types; | ||
| 10 | { | ||
| 11 | $Net::Gandi::Types::VERSION = '1.122180'; | ||
| 12 | } | ||
| 13 | |||
| 14 | # ABSTRACT: Net::Gandi types | ||
| 15 | |||
| 16 | use MooseX::Types::Moose qw/Str ArrayRef HashRef/; | ||
| 17 | use MooseX::Types -declare => [qw(Client Apikey)]; | ||
| 18 | |||
| 19 | class_type Client, { class => 'Net::Gandi::Client' }; | ||
| 20 | |||
| 21 | subtype Apikey, | ||
| 22 | as Str, | ||
| 23 | where { length($_) == 24 }, | ||
| 24 | message { "Apikey must be larger 24" }; | ||
| 25 | |||
| 26 | 1; | ||
| 27 | |||
| 28 | __END__ |