File Coverage

blib/lib/WWW/OReillyMedia/Store/Book.pm
Criterion Covered Total %
statement 12 14 85.7
branch n/a
condition n/a
subroutine 4 5 80.0
pod 1 1 100.0
total 17 20 85.0


line stmt bran cond sub pod time code
1             package WWW::OReillyMedia::Store::Book;
2              
3             $WWW::OReillyMedia::Store::Book::VERSION = '0.08';
4              
5             =head1 NAME
6              
7             WWW::OReillyMedia::Store::Book - Placeholder for the OReilly books.
8              
9             =head1 VERSION
10              
11             Version 0.08
12              
13             =cut
14              
15 1     1   4195 use 5.006;
  1         5  
  1         53  
16 1     1   8 use Data::Dumper;
  1         3  
  1         78  
17              
18 1     1   2336 use Moo;
  1         26732  
  1         7  
19 1     1   2412 use namespace::clean;
  1         15390  
  1         8  
20              
21             has 'title' => (is => 'ro');
22             has 'catalog' => (is => 'ro');
23              
24             =head1 METHODS
25              
26             =head2 get_title()
27              
28             Returns the book title.
29              
30             =head2 get_catalog()
31              
32             Returns the link to the catalog on OReilly website.
33              
34             =cut
35              
36             =head2 as_string()
37              
38             Return books details in a nice human readable format.
39              
40             =cut
41              
42             sub as_string {
43 0     0 1   my ($self) = @_;
44              
45 0           return sprintf("Title: %s, Catalog: %s", $self->title, $self->catalog);
46             }
47              
48             =head1 AUTHOR
49              
50             Mohammad S Anwar, C<< >>
51              
52             =head1 REPOSITORY
53              
54             L
55              
56             =head1 BUGS
57              
58             Please report any bugs or feature requests to C
59             rt.cpan.org>, or through the web interface at L.
60             I will be notified, and then you'll automatically be notified of progress on your
61             bug as I make changes.
62              
63             =head1 SUPPORT
64              
65             You can find documentation for this module with the perldoc command.
66              
67             perldoc WWW::OReillyMedia::Store::Book
68              
69             You can also look for information at:
70              
71             =over 4
72              
73             =item * RT: CPAN's request tracker
74              
75             L
76              
77             =item * AnnoCPAN: Annotated CPAN documentation
78              
79             L
80              
81             =item * CPAN Ratings
82              
83             L
84              
85             =item * Search CPAN
86              
87             L
88              
89             =back
90              
91             =head1 LICENSE AND COPYRIGHT
92              
93             Copyright (C) 2011 - 2014 Mohammad S Anwar.
94              
95             This program is free software; you can redistribute it and/or modify it under
96             the terms of the the Artistic License (2.0). You may obtain a copy of the full
97             license at:
98              
99             L
100              
101             Any use, modification, and distribution of the Standard or Modified Versions is
102             governed by this Artistic License.By using, modifying or distributing the Package,
103             you accept this license. Do not use, modify, or distribute the Package, if you do
104             not accept this license.
105              
106             If your Modified Version has been derived from a Modified Version made by someone
107             other than you,you are nevertheless required to ensure that your Modified Version
108             complies with the requirements of this license.
109              
110             This license does not grant you the right to use any trademark, service mark,
111             tradename, or logo of the Copyright Holder.
112              
113             This license includes the non-exclusive, worldwide, free-of-charge patent license
114             to make, have made, use, offer to sell, sell, import and otherwise transfer the
115             Package with respect to any patent claims licensable by the Copyright Holder that
116             are necessarily infringed by the Package. If you institute patent litigation
117             (including a cross-claim or counterclaim) against any party alleging that the
118             Package constitutes direct or contributory patent infringement,then this Artistic
119             License to you shall terminate on the date that such litigation is filed.
120              
121             Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND
122             CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
123             WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
124             NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS
125             REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT,
126             INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE
127             OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
128              
129             =cut
130              
131             1; # End of WWW::OReillyMedia::Store::Book