X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FDeploymentHandler%2FTypes.pm;h=2cefab6d32c7c2eab7f473be14821dd4c87b8b73;hb=c8c8cb14808f8faa08c423d3520fdfaff2dcc39e;hp=3878c9ff0455263a2218dceb7410f19ea1b5e291;hpb=418634284e2fdd63bb846894cc628ae1a61a6765;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git diff --git a/lib/DBIx/Class/DeploymentHandler/Types.pm b/lib/DBIx/Class/DeploymentHandler/Types.pm index 3878c9f..2cefab6 100644 --- a/lib/DBIx/Class/DeploymentHandler/Types.pm +++ b/lib/DBIx/Class/DeploymentHandler/Types.pm @@ -2,6 +2,8 @@ package DBIx::Class::DeploymentHandler::Types; use strict; use warnings; +# ABSTRACT: Types internal to DBIx::Class::DeploymentHandler + use Moose::Util::TypeConstraints; subtype 'DBIx::Class::DeploymentHandler::Databases' => as 'ArrayRef[Str]'; @@ -9,6 +11,19 @@ subtype 'DBIx::Class::DeploymentHandler::Databases' coerce 'DBIx::Class::DeploymentHandler::Databases' => from 'Str' => via { [$_] }; -no Moose::Util::TypeConstraints; +subtype 'StrSchemaVersion' + => as 'Str' + => message { + defined $_ + ? "Schema version (currently '$_') must be a string" + : 'Schema version must be defined' + }; + +no Moose::Util::TypeConstraints; 1; + +# vim: ts=2 sw=2 expandtab + +__END__ +