| 1 | 14 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 14 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | package Pod::Elemental::Types 0.103006; | ||||||||||
| 4 | # ABSTRACT: data types for Pod::Elemental | ||||||||||
| 5 | |||||||||||
| 6 | 14 | ▶ | use MooseX::Types -declare => [ qw(FormatName ChompedString) ]; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 14 | ▶ | use MooseX::Types::Moose qw(Str); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | #pod =head1 OVERVIEW | ||||||||||
| 10 | #pod | ||||||||||
| 11 | #pod This is a library of MooseX::Types types used by Pod::Elemental. | ||||||||||
| 12 | #pod | ||||||||||
| 13 | #pod =head1 TYPES | ||||||||||
| 14 | #pod | ||||||||||
| 15 | #pod =head2 FormatName | ||||||||||
| 16 | #pod | ||||||||||
| 17 | #pod This is a valid name for a format (a Pod5::Region). It does not expect the | ||||||||||
| 18 | #pod leading colon for pod-like regions. | ||||||||||
| 19 | #pod | ||||||||||
| 20 | #pod =cut | ||||||||||
| 21 | |||||||||||
| 22 | # Probably needs refining -- rjbs, 2009-05-26 | ||||||||||
| 23 | 20 | ▶ | subtype FormatName, as Str, where { length $_ and /\A\S+\z/ }; | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.2
Branch: 1 branch
| |||||||||||
| 24 | |||||||||||
| 25 | #pod =head2 ChompedString | ||||||||||
| 26 | #pod | ||||||||||
| 27 | #pod This is a string that does not end with newlines. It can be coerced from a | ||||||||||
| 28 | #pod Str ending in a single newline -- the newline is dropped. | ||||||||||
| 29 | #pod | ||||||||||
| 30 | #pod =cut | ||||||||||
| 31 | |||||||||||
| 32 | 228 | ▶ | subtype ChompedString, as Str, where { ! /\n\z/ }; | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 33 | 107 | ▶ | coerce ChompedString, from Str, via { chomp; $_ }; | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 34 | |||||||||||
| 35 | 14 | 1; | |||||||||
| 36 | |||||||||||
| 37 | __END__ | ||||||||||