| 1 | 23 | ▶ | use v5.26; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 23 | ▶ | use Object::Pad; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 23 | ▶ | use Getopt::Pad::Type; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | class Getopt::Pad::Type::Url :isa(Getopt::Pad::Type) :strict(params) { | ||||||||||
| 7 | 23 | ▶ | use constant NAMES => ['url', 'uri']; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 23 | our $VERSION = '0.06'; | |||||||||
| 10 | |||||||||||
| 11 | 11 | ▶ | method glSuffix() { return '=s' } | ||||||||
|
Subroutine
glSuffix: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 12 | |||||||||||
| 13 | 8 | ▶ | method label() { return 'URL' } | ||||||||
|
Subroutine
label: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 14 | |||||||||||
| 15 | 8 | ▶ | method check($value) { | ||||||||
|
Subroutine
check: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 16 | 8 | ▶ | return undef if $value =~ m{\A[a-zA-Z][a-zA-Z0-9.+-]*://\S+\z}; # scheme://... | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 4 | return sprintf("'%s' is not a URL", $value); | |||||||||
| 18 | 23 | } | |||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 23 | 1; | |||||||||
| 22 | |||||||||||
| 23 | __END__ | ||||||||||