X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FDeploymentHandler%2FTypes.pm;h=2cefab6d32c7c2eab7f473be14821dd4c87b8b73;hb=c526d5c4b55d15270931c008f4638c0fc27213b5;hp=c4946c9ca591be6533b1918134bd740c17b13343;hpb=e52174e31b95fe335f6ab8cfdbf23cc2a0c05673;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git diff --git a/lib/DBIx/Class/DeploymentHandler/Types.pm b/lib/DBIx/Class/DeploymentHandler/Types.pm index c4946c9..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,8 +11,16 @@ 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