| 1 | package Web::ID::Types; | ||
| 2 | |||
| 3 | 3 | ▶ | use 5.010; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 3 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 3 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 3 | $Web::ID::Types::AUTHORITY = 'cpan:TOBYINK'; | |
| 9 | 3 | $Web::ID::Types::VERSION = '1.927'; | |
| 10 | }; | ||
| 11 | |||
| 12 | 3 | ▶ | use Math::BigInt; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 3 | ▶ | use RDF::Trine; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | use Type::Library | ||
| 16 | 3 | ▶ | -base, |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | 3 | -declare => qw[ Bigint Certificate Finger Model Rsakey San ]; | |
| 18 | 3 | ▶ | use Type::Utils -all; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | 3 | ▶ | BEGIN { extends qw( Types::Standard Types::DateTime Types::URI ) }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | |||
| 22 | 3 | class_type Bigint, { class => "Math::BigInt" }; | |
| 23 | 3 | coerce Bigint, | |
| 24 | from Str, q { "Math::BigInt"->new($_) }; | ||
| 25 | |||
| 26 | 3 | class_type Certificate, { class => "Web::ID::Certificate" }; | |
| 27 | 3 | coerce Certificate, | |
| 28 | from HashRef, q { "Web::ID::Certificate"->new(%$_) }, | ||
| 29 | from Str, q { "Web::ID::Certificate"->new(pem => $_) }; | ||
| 30 | |||
| 31 | 3 | class_type Finger, { class => "WWW::Finger" }; | |
| 32 | 3 | coerce Finger, | |
| 33 | from Str, q { (UNIVERSAL::can("WWW::Finger", "new") ? "WWW::Finger"->new($_) : undef) }; | ||
| 34 | |||
| 35 | 3 | class_type Model, { class => "RDF::Trine::Model" }; | |
| 36 | |||
| 37 | 3 | class_type Rsakey, { class => "Web::ID::RSAKey" }; | |
| 38 | 3 | coerce Rsakey, | |
| 39 | from HashRef, q { "Web::ID::RSAKey"->new(%$_) }; | ||
| 40 | |||
| 41 | 3 | class_type San, { class => "Web::ID::SAN" }; | |
| 42 | |||
| 43 | 3 | __PACKAGE__ | |
| 44 | __END__ | ||