File Coverage

blib/lib/Moose/Experiment.pm
Criterion Covered Total %
statement 3 5 60.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 5 7 71.4


line stmt bran cond sub pod time code
1             package Moose::Experiment;
2              
3 1     1   20876 use 5.006;
  1         4  
4 1     1   467 use Moose; # Automatically turns on strict and warnings
  0            
  0            
5             # Now this code is a Moose class
6             use DateTime;
7             use DataTime::Format::Natural;
8             use Moose::Util::TypeConstraints;
9              
10             =head1 NAME
11             Mosse is a complete object system for Perl5. It provides keywords for
12             attribute declaration, object construction, inheritance and more.
13             Moose::Experiment - The great new Moose::Experiment! is for experiment
14             with Moose L and
15             L
16             lib/Module/Starter.pm> in Perl5.
17              
18             =head1 VERSION
19              
20             Version 0.01_01
21              
22             =cut
23              
24             our $VERSION = '0.01_01';
25              
26              
27             =head1 SYNOPSIS
28              
29             Quick summary of what the module does.
30              
31             Perhaps a little code snippet.
32              
33             use Moose::Experiment;
34              
35             my $foo = Moose::Experiment->new();
36             ...
37              
38             =head1 EXPORT
39              
40             A list of functions that can be exported. You can delete this section
41             if you don't export anything, such as for a purely object-oriented module.
42              
43             =head1 ATTRIBUTE/SUBROUTINES/METHODS
44              
45             =head2 ATTRIBUTE firstName
46             An attribute is a property of the class that defines it. It always has
47             a name, and it may have a number of other properties.
48             =cut
49              
50             has 'firstName' => (
51             is => 'rw', # read/wright flag
52             isa => 'Str',
53             required => 1,
54             );
55             class_type 'DateTime';
56              
57             my $en_parser = DateTime::Format::Natural->new(
58             lang => 'en',
59             time_zone => 'UTC',
60             );
61              
62             =head2 lastName
63              
64             =cut
65              
66             has 'lastName' => (
67             is => 'rw',
68             isa => 'Str',
69             );
70              
71             =head1 METHOD login
72              
73             =cut
74              
75             sub login { ... }
76              
77             =head1 METHOD MODIFIERS
78             modifiers come in different flavors like before, after, around, augument
79             and you can apply more then one modifier to a single method.
80             =cut
81              
82             before 'login' => sub {
83             my $self = shift;
84             my $pw = shift;
85             warm "called login() with $pw\n";
86             };
87              
88             =head1 AUTHOR
89              
90             Mihai Cornel, C<< >>
91              
92             =head1 BUGS
93              
94             Please report any bugs or feature requests to C, or through
95             the web interface at L. I will be notified, and then you'll
96             automatically be notified of progress on your bug as I make changes.
97              
98              
99              
100              
101             =head1 SUPPORT
102              
103             You can find documentation for this module with the perldoc command.
104              
105             perldoc Moose::Experiment
106              
107              
108             You can also look for information at:
109              
110             =over 4
111              
112             =item * RT: CPAN's request tracker (report bugs here)
113              
114             L
115              
116             =item * AnnoCPAN: Annotated CPAN documentation
117              
118             L
119              
120             =item * CPAN Ratings
121              
122             L
123              
124             =item * Search CPAN
125              
126             L
127              
128             =back
129              
130              
131             =head1 ACKNOWLEDGEMENTS
132              
133              
134             =head1 LICENSE AND COPYRIGHT
135              
136             Copyright 2015 Mihai Cornel.
137              
138             This program is free software; you can redistribute it and/or modify it
139             under the terms of the the Artistic License (2.0). You may obtain a
140             copy of the full license at:
141              
142             L
143              
144             Any use, modification, and distribution of the Standard or Modified
145             Versions is governed by this Artistic License. By using, modifying or
146             distributing the Package, you accept this license. Do not use, modify,
147             or distribute the Package, if you do not accept this license.
148              
149             If your Modified Version has been derived from a Modified Version made
150             by someone other than you, you are nevertheless required to ensure that
151             your Modified Version complies with the requirements of this license.
152              
153             This license does not grant you the right to use any trademark, service
154             mark, tradename, or logo of the Copyright Holder.
155              
156             This license includes the non-exclusive, worldwide, free-of-charge
157             patent license to make, have made, use, offer to sell, sell, import and
158             otherwise transfer the Package with respect to any patent claims
159             licensable by the Copyright Holder that are necessarily infringed by the
160             Package. If you institute patent litigation (including a cross-claim or
161             counterclaim) against any party alleging that the Package constitutes
162             direct or contributory patent infringement, then this Artistic License
163             to you shall terminate on the date that such litigation is filed.
164              
165             Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
166             AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
167             THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
168             PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
169             YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
170             CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
171             CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
172             EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
173              
174              
175             =cut
176              
177             1; # End of Moose::Experiment