view release on metacpan or search on metacpan
lib/Acme/Mitey/Cards/Deck.pm.mite.pm view on Meta::CPAN
(
do {
package Acme::Mitey::Cards::Mite;
defined($value) and do {
ref( \$value ) eq 'SCALAR'
or ref( \( my $val = $value ) ) eq 'SCALAR';
}
}
)
&& ( length($value) > 0 )
)
or croak "Type check failed in constructor: %s should be %s",
"reverse", "NonEmptyStr";
$self->{"reverse"} = $value;
};
# Attribute original_cards (type: CardArray)
# has declaration, file lib/Acme/Mitey/Cards/Deck.pm, line 23
if ( exists $args->{"original_cards"} ) {
(
lib/Acme/Mitey/Cards/Mite.pm view on Meta::CPAN
'arg' => \%arg,
'shim' => $me,
);
}
else {
# Try to determine original filename for caller, minus libdir.
# This would normally be in %INC but caller hasn't finished loading yet.
require File::Spec;
my $orig = $file;
for my $base ( @INC ) {
$base eq substr $file, 0, length $base
and -f File::Spec->catfile( $base, substr $file, 1 + length $base )
and $orig = File::Spec->abs2rel( $file, $base )
and last;
}
# Changes to this filename must be coordinated with Mite::Compiled
my $mite_file = $orig . '.mite.pm';
local $@;
if ( not eval { require $mite_file; 1 } ) {
my $e = $@;
croak "Compiled Mite file ($mite_file) for $file is missing or an error occurred loading it: $e";
lib/Acme/Mitey/Cards/Suit.pm.mite.pm view on Meta::CPAN
package Acme::Mitey::Cards::Mite;
defined( $args->{"name"} ) and do {
ref( \$args->{"name"} ) eq 'SCALAR'
or ref( \( my $val = $args->{"name"} ) ) eq 'SCALAR';
}
}
)
&& do {
package Acme::Mitey::Cards::Mite;
length( $args->{"name"} ) > 0;
}
)
or croak "Type check failed in constructor: %s should be %s", "name",
"NonEmptyStr";
$self->{"name"} = $args->{"name"};
# Attribute abbreviation (type: Str)
# has declaration, file lib/Acme/Mitey/Cards/Suit.pm, line 19
if ( exists $args->{"abbreviation"} ) {
do {
lib/Acme/Mitey/Cards/Types.pm view on Meta::CPAN
}
# LowerCaseSimpleStr
{
my $type;
sub LowerCaseSimpleStr () {
$type ||= bless( { check => \&is_LowerCaseSimpleStr, name => "LowerCaseSimpleStr", library => "Types::Common::String", library_name => "LowerCaseSimpleStr" }, "Acme::Mitey::Cards::Types::TypeConstraint" );
}
sub is_LowerCaseSimpleStr ($) {
(do { (do { ((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) <= 255) && ($_[0] !~ /\n/)) } && (length($_[0]) > 0)) } && do { $_[0] !~ /\p{Upper}/ms })
}
sub assert_LowerCaseSimpleStr ($) {
(do { (do { ((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) <= 255) && ($_[0] !~ /\n/)) } && (length($_[0]) > 0)) } && do { $_[0] !~ /\p{Upper}/ms }) ? $_[0] : LowerCaseSimple...
}
$EXPORT_TAGS{"LowerCaseSimpleStr"} = [ qw( LowerCaseSimpleStr is_LowerCaseSimpleStr assert_LowerCaseSimpleStr ) ];
push @EXPORT_OK, @{ $EXPORT_TAGS{"LowerCaseSimpleStr"} };
push @{ $EXPORT_TAGS{"types"} }, "LowerCaseSimpleStr";
push @{ $EXPORT_TAGS{"is"} }, "is_LowerCaseSimpleStr";
push @{ $EXPORT_TAGS{"assert"} }, "assert_LowerCaseSimpleStr";
}
# LowerCaseStr
{
my $type;
sub LowerCaseStr () {
$type ||= bless( { check => \&is_LowerCaseStr, name => "LowerCaseStr", library => "Types::Common::String", library_name => "LowerCaseStr" }, "Acme::Mitey::Cards::Types::TypeConstraint" );
}
sub is_LowerCaseStr ($) {
(do { ((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) > 0)) } && do { $_[0] !~ /\p{Upper}/ms })
}
sub assert_LowerCaseStr ($) {
(do { ((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) > 0)) } && do { $_[0] !~ /\p{Upper}/ms }) ? $_[0] : LowerCaseStr->get_message( $_[0] );
}
$EXPORT_TAGS{"LowerCaseStr"} = [ qw( LowerCaseStr is_LowerCaseStr assert_LowerCaseStr ) ];
push @EXPORT_OK, @{ $EXPORT_TAGS{"LowerCaseStr"} };
push @{ $EXPORT_TAGS{"types"} }, "LowerCaseStr";
push @{ $EXPORT_TAGS{"is"} }, "is_LowerCaseStr";
push @{ $EXPORT_TAGS{"assert"} }, "assert_LowerCaseStr";
}
lib/Acme/Mitey/Cards/Types.pm view on Meta::CPAN
}
# NonEmptySimpleStr
{
my $type;
sub NonEmptySimpleStr () {
$type ||= bless( { check => \&is_NonEmptySimpleStr, name => "NonEmptySimpleStr", library => "Types::Common::String", library_name => "NonEmptySimpleStr" }, "Acme::Mitey::Cards::Types::TypeConstraint" );
}
sub is_NonEmptySimpleStr ($) {
(do { ((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) <= 255) && ($_[0] !~ /\n/)) } && (length($_[0]) > 0))
}
sub assert_NonEmptySimpleStr ($) {
(do { ((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) <= 255) && ($_[0] !~ /\n/)) } && (length($_[0]) > 0)) ? $_[0] : NonEmptySimpleStr->get_message( $_[0] );
}
$EXPORT_TAGS{"NonEmptySimpleStr"} = [ qw( NonEmptySimpleStr is_NonEmptySimpleStr assert_NonEmptySimpleStr ) ];
push @EXPORT_OK, @{ $EXPORT_TAGS{"NonEmptySimpleStr"} };
push @{ $EXPORT_TAGS{"types"} }, "NonEmptySimpleStr";
push @{ $EXPORT_TAGS{"is"} }, "is_NonEmptySimpleStr";
push @{ $EXPORT_TAGS{"assert"} }, "assert_NonEmptySimpleStr";
}
# NonEmptyStr
{
my $type;
sub NonEmptyStr () {
$type ||= bless( { check => \&is_NonEmptyStr, name => "NonEmptyStr", library => "Types::Common::String", library_name => "NonEmptyStr" }, "Acme::Mitey::Cards::Types::TypeConstraint" );
}
sub is_NonEmptyStr ($) {
((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) > 0))
}
sub assert_NonEmptyStr ($) {
((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) > 0)) ? $_[0] : NonEmptyStr->get_message( $_[0] );
}
$EXPORT_TAGS{"NonEmptyStr"} = [ qw( NonEmptyStr is_NonEmptyStr assert_NonEmptyStr ) ];
push @EXPORT_OK, @{ $EXPORT_TAGS{"NonEmptyStr"} };
push @{ $EXPORT_TAGS{"types"} }, "NonEmptyStr";
push @{ $EXPORT_TAGS{"is"} }, "is_NonEmptyStr";
push @{ $EXPORT_TAGS{"assert"} }, "assert_NonEmptyStr";
}
lib/Acme/Mitey/Cards/Types.pm view on Meta::CPAN
}
# NumericCode
{
my $type;
sub NumericCode () {
$type ||= bless( { check => \&is_NumericCode, name => "NumericCode", library => "Types::Common::String", library_name => "NumericCode" }, "Acme::Mitey::Cards::Types::TypeConstraint" );
}
sub is_NumericCode ($) {
(do { ((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) <= 255) && ($_[0] !~ /\n/)) } && ($_[0] =~ m/^[0-9]+$/))
}
sub assert_NumericCode ($) {
(do { ((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) <= 255) && ($_[0] !~ /\n/)) } && ($_[0] =~ m/^[0-9]+$/)) ? $_[0] : NumericCode->get_message( $_[0] );
}
$EXPORT_TAGS{"NumericCode"} = [ qw( NumericCode is_NumericCode assert_NumericCode ) ];
push @EXPORT_OK, @{ $EXPORT_TAGS{"NumericCode"} };
push @{ $EXPORT_TAGS{"types"} }, "NumericCode";
push @{ $EXPORT_TAGS{"is"} }, "is_NumericCode";
push @{ $EXPORT_TAGS{"assert"} }, "assert_NumericCode";
}
lib/Acme/Mitey/Cards/Types.pm view on Meta::CPAN
}
# Password
{
my $type;
sub Password () {
$type ||= bless( { check => \&is_Password, name => "Password", library => "Types::Common::String", library_name => "Password" }, "Acme::Mitey::Cards::Types::TypeConstraint" );
}
sub is_Password ($) {
(do { ((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) <= 255) && ($_[0] !~ /\n/)) } && (length($_[0]) > 3))
}
sub assert_Password ($) {
(do { ((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) <= 255) && ($_[0] !~ /\n/)) } && (length($_[0]) > 3)) ? $_[0] : Password->get_message( $_[0] );
}
$EXPORT_TAGS{"Password"} = [ qw( Password is_Password assert_Password ) ];
push @EXPORT_OK, @{ $EXPORT_TAGS{"Password"} };
push @{ $EXPORT_TAGS{"types"} }, "Password";
push @{ $EXPORT_TAGS{"is"} }, "is_Password";
push @{ $EXPORT_TAGS{"assert"} }, "assert_Password";
}
lib/Acme/Mitey/Cards/Types.pm view on Meta::CPAN
}
# SimpleStr
{
my $type;
sub SimpleStr () {
$type ||= bless( { check => \&is_SimpleStr, name => "SimpleStr", library => "Types::Common::String", library_name => "SimpleStr" }, "Acme::Mitey::Cards::Types::TypeConstraint" );
}
sub is_SimpleStr ($) {
((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) <= 255) && ($_[0] !~ /\n/))
}
sub assert_SimpleStr ($) {
((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) <= 255) && ($_[0] !~ /\n/)) ? $_[0] : SimpleStr->get_message( $_[0] );
}
$EXPORT_TAGS{"SimpleStr"} = [ qw( SimpleStr is_SimpleStr assert_SimpleStr ) ];
push @EXPORT_OK, @{ $EXPORT_TAGS{"SimpleStr"} };
push @{ $EXPORT_TAGS{"types"} }, "SimpleStr";
push @{ $EXPORT_TAGS{"is"} }, "is_SimpleStr";
push @{ $EXPORT_TAGS{"assert"} }, "assert_SimpleStr";
}
lib/Acme/Mitey/Cards/Types.pm view on Meta::CPAN
}
# StrongPassword
{
my $type;
sub StrongPassword () {
$type ||= bless( { check => \&is_StrongPassword, name => "StrongPassword", library => "Types::Common::String", library_name => "StrongPassword" }, "Acme::Mitey::Cards::Types::TypeConstraint" );
}
sub is_StrongPassword ($) {
(do { ((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) <= 255) && ($_[0] !~ /\n/)) } && (length($_[0]) > 7) && ($_[0] =~ /[^a-zA-Z]/))
}
sub assert_StrongPassword ($) {
(do { ((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) <= 255) && ($_[0] !~ /\n/)) } && (length($_[0]) > 7) && ($_[0] =~ /[^a-zA-Z]/)) ? $_[0] : StrongPassword->get_message( $_[0...
}
$EXPORT_TAGS{"StrongPassword"} = [ qw( StrongPassword is_StrongPassword assert_StrongPassword ) ];
push @EXPORT_OK, @{ $EXPORT_TAGS{"StrongPassword"} };
push @{ $EXPORT_TAGS{"types"} }, "StrongPassword";
push @{ $EXPORT_TAGS{"is"} }, "is_StrongPassword";
push @{ $EXPORT_TAGS{"assert"} }, "assert_StrongPassword";
}
lib/Acme/Mitey/Cards/Types.pm view on Meta::CPAN
}
# UpperCaseSimpleStr
{
my $type;
sub UpperCaseSimpleStr () {
$type ||= bless( { check => \&is_UpperCaseSimpleStr, name => "UpperCaseSimpleStr", library => "Types::Common::String", library_name => "UpperCaseSimpleStr" }, "Acme::Mitey::Cards::Types::TypeConstraint" );
}
sub is_UpperCaseSimpleStr ($) {
(do { (do { ((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) <= 255) && ($_[0] !~ /\n/)) } && (length($_[0]) > 0)) } && do { $_[0] !~ /\p{Lower}/ms })
}
sub assert_UpperCaseSimpleStr ($) {
(do { (do { ((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) <= 255) && ($_[0] !~ /\n/)) } && (length($_[0]) > 0)) } && do { $_[0] !~ /\p{Lower}/ms }) ? $_[0] : UpperCaseSimple...
}
$EXPORT_TAGS{"UpperCaseSimpleStr"} = [ qw( UpperCaseSimpleStr is_UpperCaseSimpleStr assert_UpperCaseSimpleStr ) ];
push @EXPORT_OK, @{ $EXPORT_TAGS{"UpperCaseSimpleStr"} };
push @{ $EXPORT_TAGS{"types"} }, "UpperCaseSimpleStr";
push @{ $EXPORT_TAGS{"is"} }, "is_UpperCaseSimpleStr";
push @{ $EXPORT_TAGS{"assert"} }, "assert_UpperCaseSimpleStr";
}
# UpperCaseStr
{
my $type;
sub UpperCaseStr () {
$type ||= bless( { check => \&is_UpperCaseStr, name => "UpperCaseStr", library => "Types::Common::String", library_name => "UpperCaseStr" }, "Acme::Mitey::Cards::Types::TypeConstraint" );
}
sub is_UpperCaseStr ($) {
(do { ((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) > 0)) } && do { $_[0] !~ /\p{Lower}/ms })
}
sub assert_UpperCaseStr ($) {
(do { ((do { defined($_[0]) and do { ref(\$_[0]) eq 'SCALAR' or ref(\(my $val = $_[0])) eq 'SCALAR' } }) && (length($_[0]) > 0)) } && do { $_[0] !~ /\p{Lower}/ms }) ? $_[0] : UpperCaseStr->get_message( $_[0] );
}
$EXPORT_TAGS{"UpperCaseStr"} = [ qw( UpperCaseStr is_UpperCaseStr assert_UpperCaseStr ) ];
push @EXPORT_OK, @{ $EXPORT_TAGS{"UpperCaseStr"} };
push @{ $EXPORT_TAGS{"types"} }, "UpperCaseStr";
push @{ $EXPORT_TAGS{"is"} }, "is_UpperCaseStr";
push @{ $EXPORT_TAGS{"assert"} }, "assert_UpperCaseStr";
}