Skip to content

Instantly share code, notes, and snippets.

@amiri
Created June 28, 2009 17:08
Show Gist options
  • Save amiri/137314 to your computer and use it in GitHub Desktop.
Save amiri/137314 to your computer and use it in GitHub Desktop.
package MoosifierTest::Types::Library;
require Exporter;
@ISA = qw/Exporter/;
@EXPORT = qw /Email Bool Value Num Int Str ArrayRef HashRef Object SimpleStr NonEmptySimpleStr StrongPassword NonEmptyStr Uri DateTime/;
use MooseX::Types -declare =>
[qw/
Email
/];
use Email::Valid;
use MooseX::Types::Moose qw/Bool Value Num Int Str ArrayRef HashRef Object/;
use MooseX::Types::Common::String qw/SimpleStr NonEmptySimpleStr StrongPassword NonEmptyStr/;
use MooseX::Types::DateTime qw/DateTime/;
use MooseX::Types::URI qw/Uri/;
use Moose::Util::TypeConstraints;
subtype Email,
as SimpleStr,
where { Email::Valid->address($_) },
message { "Not a valid email address." };
# Created by DBIx::Class::Schema::Loader v0.04999_07 @ 2009-06-28 12:21:00
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OWeRwUHdoaQiAipWXmzWsA
# You can replace this text with custom content, and it will be preserved on regeneration
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment