line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::Plain::Base; |
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
38
|
use strict; |
|
7
|
|
|
|
|
11
|
|
|
7
|
|
|
|
|
160
|
|
4
|
7
|
|
|
7
|
|
26
|
use warnings; |
|
7
|
|
|
|
|
10
|
|
|
7
|
|
|
|
|
498
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
23
|
|
|
23
|
1
|
21266
|
my $class = shift; |
8
|
|
|
|
|
|
|
|
9
|
23
|
100
|
|
|
|
70
|
my $self = ref $_[0] ? {%{$_[0]}} : {@_}; |
|
1
|
|
|
|
|
3
|
|
10
|
|
|
|
|
|
|
|
11
|
23
|
|
33
|
|
|
93
|
bless $self, ref $class || $class; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
1; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=encoding UTF-8 |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 Name |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
C - Provide Constructor |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 Description |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
This module provides a constructor C. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 Class Methods |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 new |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
my $object = Class::Plain::Base->new(%args); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
my $object = Class::Plain::Base->new(\%args); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Create a new object. The implementation is the following. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub new { |
37
|
|
|
|
|
|
|
my $class = shift; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
my $self = ref $_[0] ? {%{$_[0]}} : {@_}; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
bless $self, ref $class || $class; |
42
|
|
|
|
|
|
|
} |