line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::Plain::Base; |
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
43
|
use strict; |
|
7
|
|
|
|
|
14
|
|
|
7
|
|
|
|
|
185
|
|
4
|
7
|
|
|
7
|
|
31
|
use warnings; |
|
7
|
|
|
|
|
11
|
|
|
7
|
|
|
|
|
602
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
23
|
|
|
23
|
1
|
25324
|
my $class = shift; |
8
|
|
|
|
|
|
|
|
9
|
23
|
100
|
|
|
|
85
|
my $self = ref $_[0] ? {%{$_[0]}} : {@_}; |
|
1
|
|
|
|
|
3
|
|
10
|
|
|
|
|
|
|
|
11
|
23
|
|
33
|
|
|
116
|
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
|
|
|
|
|
|
|
} |