| 1 | # | ||||||||||
| 2 | # This file is part of Games-RailRoad | ||||||||||
| 3 | # | ||||||||||
| 4 | # This software is copyright (c) 2008 by Jerome Quelin. | ||||||||||
| 5 | # | ||||||||||
| 6 | # This is free software; you can redistribute it and/or modify it under | ||||||||||
| 7 | # the same terms as the Perl 5 programming language system itself. | ||||||||||
| 8 | # | ||||||||||
| 9 | 2 | ▶ | use 5.010; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | package Games::RailRoad::Types; | ||||||||||
| 14 | 2 | ▶ | BEGIN { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | 2 | $Games::RailRoad::Types::VERSION = '1.101330'; | |||||||||
| 16 | } | ||||||||||
| 17 | # ABSTRACT: private types for the distribution | ||||||||||
| 18 | |||||||||||
| 19 | 2 | ▶ | use MooseX::Types -declare => [ qw{ Num_0_1 } ]; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 20 | 2 | ▶ | use MooseX::Types::Moose qw{ Num }; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 21 | |||||||||||
| 22 | |||||||||||
| 23 | # -- type definition | ||||||||||
| 24 | |||||||||||
| 25 | subtype Num_0_1, | ||||||||||
| 26 | as Num, | ||||||||||
| 27 | 0 | ▶ | where { $_ >= 0 && $_ <= 1}, | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 28 | 0 | ▶ | message { 'Num should be between 0 and 1' }; | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 29 | |||||||||||
| 30 | 2 | 1; | |||||||||
| 31 | |||||||||||
| 32 | |||||||||||
| 33 | =pod | ||||||||||
| 34 | |||||||||||
| 35 | =head1 NAME | ||||||||||
| 36 | |||||||||||
| 37 | Games::RailRoad::Types - private types for the distribution | ||||||||||
| 38 | |||||||||||
| 39 | =head1 VERSION | ||||||||||
| 40 | |||||||||||
| 41 | version 1.101330 | ||||||||||
| 42 | |||||||||||
| 43 | =head1 DESCRIPTION | ||||||||||
| 44 | |||||||||||
| 45 | This module is defining some L<Moose> subtypes to be used elsewhere in | ||||||||||
| 46 | the distribution. | ||||||||||
| 47 | |||||||||||
| 48 | Available types exported: | ||||||||||
| 49 | |||||||||||
| 50 | =over 4 | ||||||||||
| 51 | |||||||||||
| 52 | =item * Num_0_1 | ||||||||||
| 53 | |||||||||||
| 54 | A float between 0 and 1. | ||||||||||
| 55 | |||||||||||
| 56 | =back | ||||||||||
| 57 | |||||||||||
| 58 | =head1 AUTHOR | ||||||||||
| 59 | |||||||||||
| 60 | Jerome Quelin | ||||||||||
| 61 | |||||||||||
| 62 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 63 | |||||||||||
| 64 | This software is copyright (c) 2008 by Jerome Quelin. | ||||||||||
| 65 | |||||||||||
| 66 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 67 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 68 | |||||||||||
| 69 | =cut | ||||||||||
| 70 | |||||||||||
| 71 | |||||||||||
| 72 | __END__ | ||||||||||