line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Romanian::Person; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
21501
|
use 5.006; |
|
1
|
|
|
|
|
4
|
|
4
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings FATAL => 'all'; |
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
321
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Romanian::Person - The great new Romanian::Person! |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Version 0.01 |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=cut |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = '0.01_01'; |
18
|
|
|
|
|
|
|
#--------------------------------------------------------------------------- |
19
|
|
|
|
|
|
|
# Call the _run() method if the module was called as a script |
20
|
|
|
|
|
|
|
#--------------------------------------------------------------------------- |
21
|
|
|
|
|
|
|
__PACKAGE__->_run unless caller(); |
22
|
|
|
|
|
|
|
#---------------------------------------------------------------------------- |
23
|
|
|
|
|
|
|
# The Constructor |
24
|
|
|
|
|
|
|
#---------------------------------------------------------------------------- |
25
|
|
|
|
|
|
|
sub new { |
26
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
27
|
0
|
|
|
|
|
|
my $self = { |
28
|
|
|
|
|
|
|
_firstName => shift, |
29
|
|
|
|
|
|
|
_lastName => shift, |
30
|
|
|
|
|
|
|
}; |
31
|
|
|
|
|
|
|
#-------------------------------------------------------------------- |
32
|
|
|
|
|
|
|
# For clarification print all the values. |
33
|
|
|
|
|
|
|
#-------------------------------------------------------------------- |
34
|
0
|
|
|
|
|
|
print "First Name is $self->{_firstName}\n"; |
35
|
0
|
|
|
|
|
|
print "Last Name is $self->{_lastName}\n"; |
36
|
0
|
|
|
|
|
|
bless $self, $class; |
37
|
0
|
|
|
|
|
|
return $self; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 SYNOPSIS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Quick summary of what the module does. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Perhaps a little code snippet. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
use Romanian::Person; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
my $object = Romanian::Person->new("Mihai", "Cornel"); |
51
|
|
|
|
|
|
|
... |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 getFirstName() |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub getFirstName { |
60
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
61
|
0
|
|
|
|
|
|
return $self->{_firstName}; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 getLastName() |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub getLastName { |
69
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
70
|
0
|
|
|
|
|
|
return $self->{_lastName}; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 _run() |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
This is an example of use module. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=cut |
78
|
|
|
|
|
|
|
#---------------------------------------------------------------- |
79
|
|
|
|
|
|
|
# Method for run of this code. |
80
|
|
|
|
|
|
|
#------------------------------------------------------------------ |
81
|
|
|
|
|
|
|
sub _run { |
82
|
0
|
|
|
0
|
|
|
my $object = new Romanian::Person("Mihai", "Cornel"); |
83
|
0
|
|
|
|
|
|
print $object->getFirstName, "\n"; |
84
|
0
|
|
|
|
|
|
print $object->getLastName, "\n"; |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 AUTHOR |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Mihai Cornel, C<< >> |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 BUGS |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
94
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
95
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 SUPPORT |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
perldoc Romanian::Person |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
You can also look for information at: |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=over 4 |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
L |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
L |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=item * CPAN Ratings |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
L |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=item * Search CPAN |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
L |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=back |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
Copyright 2015 Mihai Cornel. |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
138
|
|
|
|
|
|
|
under the terms of the the Artistic License (2.0). You may obtain a |
139
|
|
|
|
|
|
|
copy of the full license at: |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
L |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
Any use, modification, and distribution of the Standard or Modified |
144
|
|
|
|
|
|
|
Versions is governed by this Artistic License. By using, modifying or |
145
|
|
|
|
|
|
|
distributing the Package, you accept this license. Do not use, modify, |
146
|
|
|
|
|
|
|
or distribute the Package, if you do not accept this license. |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
If your Modified Version has been derived from a Modified Version made |
149
|
|
|
|
|
|
|
by someone other than you, you are nevertheless required to ensure that |
150
|
|
|
|
|
|
|
your Modified Version complies with the requirements of this license. |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
This license does not grant you the right to use any trademark, service |
153
|
|
|
|
|
|
|
mark, tradename, or logo of the Copyright Holder. |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
This license includes the non-exclusive, worldwide, free-of-charge |
156
|
|
|
|
|
|
|
patent license to make, have made, use, offer to sell, sell, import and |
157
|
|
|
|
|
|
|
otherwise transfer the Package with respect to any patent claims |
158
|
|
|
|
|
|
|
licensable by the Copyright Holder that are necessarily infringed by the |
159
|
|
|
|
|
|
|
Package. If you institute patent litigation (including a cross-claim or |
160
|
|
|
|
|
|
|
counterclaim) against any party alleging that the Package constitutes |
161
|
|
|
|
|
|
|
direct or contributory patent infringement, then this Artistic License |
162
|
|
|
|
|
|
|
to you shall terminate on the date that such litigation is filed. |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER |
165
|
|
|
|
|
|
|
AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. |
166
|
|
|
|
|
|
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
167
|
|
|
|
|
|
|
PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY |
168
|
|
|
|
|
|
|
YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR |
169
|
|
|
|
|
|
|
CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR |
170
|
|
|
|
|
|
|
CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, |
171
|
|
|
|
|
|
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=cut |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
1; # End of Romanian::Person |