File Coverage

blib/lib/WebService/ScormCloud/Types.pm
Criterion Covered Total %
statement 1 3 33.3
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 2 4 50.0


line stmt bran cond sub pod time code
1             package WebService::ScormCloud::Types;
2              
3 1     1   6028 use Moose::Util::TypeConstraints;
  0            
  0            
4              
5             =head1 NAME
6              
7             WebService::ScormCloud::Types - type definitions for L<WebService::ScormCloud>
8              
9             =head1 VERSION
10              
11             Version 0.03
12              
13             =cut
14              
15             our $VERSION = '0.03';
16              
17             =head1 SYNOPSIS
18              
19             use WebService::ScormCloud::Types;
20              
21             =head1 DESCRIPTION
22              
23             Moose type definitions for L<WebService::ScormCloud>.
24              
25             =cut
26              
27             use LWP::UserAgent;
28             use URI;
29              
30             =head2 TYPES
31              
32             =head1 WebService::ScormCloud::Types::LWP::UserAgent
33              
34             Subtype of L<LWP::UserAgent>. Can be coerced from a string which
35             defines the C<$ua->agent>.
36              
37             =cut
38              
39             subtype 'WebService::ScormCloud::Types::LWP::UserAgent' => as 'LWP::UserAgent';
40              
41             coerce 'WebService::ScormCloud::Types::LWP::UserAgent' => from 'Str' => via
42             {
43             my $ua = LWP::UserAgent->new;
44             $ua->agent($_);
45             $ua;
46             };
47              
48             =head1 WebService::ScormCloud::Types::URI
49              
50             Subtype of L<URI>. Can be coerced from a string representing the
51             URL.
52              
53             =cut
54              
55             subtype 'WebService::ScormCloud::Types::URI' => as 'URI';
56              
57             coerce 'WebService::ScormCloud::Types::URI' => from 'Str' => via
58             {
59             URI->new($_);
60             };
61              
62             1;
63              
64             __END__
65              
66             =head1 SEE ALSO
67              
68             L<Moose::Util::TypeConstraints>
69              
70             =head1 AUTHOR
71              
72             Larry Leszczynski, C<< <larryl at cpan.org> >>
73              
74             =head1 BUGS
75              
76             Please report any bugs or feature requests to C<bug-scormcloud at rt.cpan.org>, or through
77             the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-ScormCloud>. I will be notified, and then you'll
78             automatically be notified of progress on your bug as I make changes.
79              
80             Patches more than welcome, especially via GitHub:
81             L<https://github.com/larryl/ScormCloud>
82              
83             =head1 SUPPORT
84              
85             You can find documentation for this module with the perldoc command.
86              
87             perldoc WebService::ScormCloud::Types
88              
89             You can also look for information at:
90              
91             =over 4
92              
93             =item * GitHub
94              
95             L<https://github.com/larryl/ScormCloud>
96              
97             =item * RT: CPAN's request tracker
98              
99             L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=WebService-ScormCloud>
100              
101             =item * AnnoCPAN: Annotated CPAN documentation
102              
103             L<http://annocpan.org/dist/WebService-ScormCloud>
104              
105             =item * CPAN Ratings
106              
107             L<http://cpanratings.perl.org/d/WebService-ScormCloud>
108              
109             =item * Search CPAN
110              
111             L<http://search.cpan.org/dist/WebService-ScormCloud/>
112              
113             =back
114              
115             =head1 ACKNOWLEDGEMENTS
116              
117              
118             =head1 COPYRIGHT & LICENSE
119              
120             Copyright 2010 Larry Leszczynski.
121              
122             This program is free software; you can redistribute it and/or modify it
123             under the terms of either: the GNU General Public License as published
124             by the Free Software Foundation; or the Artistic License.
125              
126             See http://dev.perl.org/licenses/ for more information.
127              
128             =cut
129