line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Web::ID::Types; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
67
|
use 5.010; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
129
|
|
4
|
3
|
|
|
3
|
|
15
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
99
|
|
5
|
3
|
|
|
3
|
|
25
|
use utf8; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
20
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
BEGIN { |
8
|
3
|
|
|
3
|
|
126
|
$Web::ID::Types::AUTHORITY = 'cpan:TOBYINK'; |
9
|
3
|
|
|
|
|
50
|
$Web::ID::Types::VERSION = '1.927'; |
10
|
|
|
|
|
|
|
}; |
11
|
|
|
|
|
|
|
|
12
|
3
|
|
|
3
|
|
16876
|
use Math::BigInt; |
|
3
|
|
|
|
|
118371
|
|
|
3
|
|
|
|
|
24
|
|
13
|
3
|
|
|
3
|
|
89718
|
use RDF::Trine; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use Type::Library |
16
|
|
|
|
|
|
|
-base, |
17
|
|
|
|
|
|
|
-declare => qw[ Bigint Certificate Finger Model Rsakey San ]; |
18
|
|
|
|
|
|
|
use Type::Utils -all; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
BEGIN { extends qw( Types::Standard Types::DateTime Types::URI ) }; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
class_type Bigint, { class => "Math::BigInt" }; |
23
|
|
|
|
|
|
|
coerce Bigint, |
24
|
|
|
|
|
|
|
from Str, q { "Math::BigInt"->new($_) }; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
class_type Certificate, { class => "Web::ID::Certificate" }; |
27
|
|
|
|
|
|
|
coerce Certificate, |
28
|
|
|
|
|
|
|
from HashRef, q { "Web::ID::Certificate"->new(%$_) }, |
29
|
|
|
|
|
|
|
from Str, q { "Web::ID::Certificate"->new(pem => $_) }; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
class_type Finger, { class => "WWW::Finger" }; |
32
|
|
|
|
|
|
|
coerce Finger, |
33
|
|
|
|
|
|
|
from Str, q { (UNIVERSAL::can("WWW::Finger", "new") ? "WWW::Finger"->new($_) : undef) }; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
class_type Model, { class => "RDF::Trine::Model" }; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
class_type Rsakey, { class => "Web::ID::RSAKey" }; |
38
|
|
|
|
|
|
|
coerce Rsakey, |
39
|
|
|
|
|
|
|
from HashRef, q { "Web::ID::RSAKey"->new(%$_) }; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
class_type San, { class => "Web::ID::SAN" }; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__PACKAGE__ |
44
|
|
|
|
|
|
|
__END__ |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 NAME |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Web::ID::Types - type library for Web::ID and friends |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 DESCRIPTION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
A L<Type::Library> defining: |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head2 Types |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=over |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=item * C<Bigint> |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=item * C<Certificate> |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=item * C<Finger> |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=item * C<Model> |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=item * C<Rsakey> |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item * C<San> |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=back |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
... and re-exporting everything from L<Types::Standard>, |
73
|
|
|
|
|
|
|
L<Types::DateTime>, and L<Types::URI>. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 BUGS |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Please report any bugs to |
78
|
|
|
|
|
|
|
L<http://rt.cpan.org/Dist/Display.html?Queue=Web-ID>. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 SEE ALSO |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
L<Web::ID>, L<Type::Library>. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 AUTHOR |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Toby Inkster E<lt>tobyink@cpan.orgE<gt>. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENCE |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
This software is copyright (c) 2012 by Toby Inkster. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
93
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 DISCLAIMER OF WARRANTIES |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED |
98
|
|
|
|
|
|
|
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF |
99
|
|
|
|
|
|
|
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
100
|
|
|
|
|
|
|
|