| 1 | package Cikl::DataTypes::LowerCaseStr; | ||
| 2 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 4 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 4 | ▶ | use Mouse::Util::TypeConstraints; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | subtype "Cikl::DataTypes::LowerCaseStr", | ||
| 8 | as 'Str', | ||
| 9 | 41 | ▶ | where { !/\p{Upper}/ms }, |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 10 | 0 | ▶ | message { "Must be lowercase." }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 11 | |||
| 12 | coerce 'Cikl::DataTypes::LowerCaseStr', | ||
| 13 | from 'Str', | ||
| 14 | 0 | ▶ | via { lc }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 15 | |||
| 16 | 4 | 1; | |
| 17 | |||
| 18 | |||