croak on a couple errors that should be fatal
[dbsrgits/DBIx-Class-DeploymentHandler.git] / lib / DBIx / Class / DeploymentHandler / Types.pm
1 package DBIx::Class::DeploymentHandler::Types;
2 use strict;
3 use warnings;
4
5 # ABSTRACT: Types internal to DBIx::Class::DeploymentHandler
6
7 use Moose::Util::TypeConstraints;
8 subtype 'DBIx::Class::DeploymentHandler::Databases'
9  => as 'ArrayRef[Str]';
10
11 coerce 'DBIx::Class::DeploymentHandler::Databases'
12  => from 'Str'
13  => via { [$_] };
14
15 subtype 'StrSchemaVersion'
16  => as 'Str'
17  => message {
18   defined $_
19     ? "Schema version (currently '$_') must be a string"
20     : 'Schema version must be defined'
21  };
22
23 no Moose::Util::TypeConstraints;
24 1;
25
26 # vim: ts=2 sw=2 expandtab
27
28 __END__
29