line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Path::Resolver::Role::Converter 3.100455; |
2
|
|
|
|
|
|
|
# ABSTRACT: something that converts from one type to another |
3
|
1
|
|
|
1
|
|
609
|
use Moose::Role; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
4483
|
use namespace::autoclean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
#pod =head1 IMPLEMENTING |
8
|
|
|
|
|
|
|
#pod |
9
|
|
|
|
|
|
|
#pod Classes implementing the Converter role must provide three methods: |
10
|
|
|
|
|
|
|
#pod |
11
|
|
|
|
|
|
|
#pod =method input_type |
12
|
|
|
|
|
|
|
#pod |
13
|
|
|
|
|
|
|
#pod This method must return the type of input that's expected. |
14
|
|
|
|
|
|
|
#pod |
15
|
|
|
|
|
|
|
#pod =method output_type |
16
|
|
|
|
|
|
|
#pod |
17
|
|
|
|
|
|
|
#pod This method must return the type of input that's promised to be returned. |
18
|
|
|
|
|
|
|
#pod |
19
|
|
|
|
|
|
|
#pod =method convert |
20
|
|
|
|
|
|
|
#pod |
21
|
|
|
|
|
|
|
#pod This method performs the actual converstion. It's passed an object of |
22
|
|
|
|
|
|
|
#pod C<input_type> and returns an object of C<output_type>. |
23
|
|
|
|
|
|
|
#pod |
24
|
|
|
|
|
|
|
#pod =cut |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
requires 'input_type'; |
27
|
|
|
|
|
|
|
requires 'output_type'; |
28
|
|
|
|
|
|
|
requires 'convert'; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=pod |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=encoding UTF-8 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Path::Resolver::Role::Converter - something that converts from one type to another |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 VERSION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
version 3.100455 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 PERL VERSION |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
This library should run on perls released even a long time ago. It should work |
49
|
|
|
|
|
|
|
on any version of perl released in the last five years. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Although it may work on older versions of perl, no guarantee is made that the |
52
|
|
|
|
|
|
|
minimum required version will not be increased. The version may be increased |
53
|
|
|
|
|
|
|
for any reason, and there is no promise that patches will be accepted to lower |
54
|
|
|
|
|
|
|
the minimum required perl. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 METHODS |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 input_type |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
This method must return the type of input that's expected. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 output_type |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This method must return the type of input that's promised to be returned. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 convert |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
This method performs the actual converstion. It's passed an object of |
69
|
|
|
|
|
|
|
C<input_type> and returns an object of C<output_type>. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 IMPLEMENTING |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Classes implementing the Converter role must provide three methods: |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 AUTHOR |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Ricardo Signes <cpan@semiotic.systems> |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
This software is copyright (c) 2022 by Ricardo Signes. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
84
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=cut |