line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Collection::Utl::Item; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Collection::Utl::Item - Base class for objects. |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 SYNOPSIS |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Collection::Utl::Item; |
10
|
|
|
|
|
|
|
our @ISA = qw( Collection::Utl::Item ); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 DESCRIPTION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Base class for objects. |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
76
|
|
19
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
61
|
|
20
|
2
|
|
|
2
|
|
18
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
53
|
|
21
|
2
|
|
|
2
|
|
11
|
use Carp; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
163
|
|
22
|
2
|
|
|
2
|
|
13
|
use Data::Dumper; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
92
|
|
23
|
2
|
|
|
2
|
|
198
|
use Collection::Utl::Base; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
642
|
|
24
|
|
|
|
|
|
|
@Collection::Utl::Item::ISA = qw(Collection::Utl::Base); |
25
|
|
|
|
|
|
|
$Collection::Utl::Item::VERSION = '0.02'; |
26
|
|
|
|
|
|
|
attributes(qw/ _attr/); |
27
|
0
|
|
|
0
|
0
|
|
sub init { return 1 }; #if suss |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub _init { |
30
|
0
|
|
|
0
|
|
|
my $self = shift; |
31
|
0
|
|
|
|
|
|
$self->_attr(shift); |
32
|
0
|
|
|
|
|
|
return $self->init(@_); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub _get_attr { |
36
|
0
|
|
|
0
|
|
|
return $_[0]->_attr; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub _changed { |
40
|
0
|
|
|
0
|
|
|
my $self = shift; |
41
|
0
|
|
|
|
|
|
my $rec = $self->_attr(); |
42
|
0
|
0
|
0
|
|
|
|
if ( ref $rec eq 'HASH' and my $obj = tied %$rec ) { |
43
|
0
|
|
|
|
|
|
return $obj->_changed; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
else { |
46
|
0
|
|
|
|
|
|
carp ref($self) . "Not tied _attr"; |
47
|
|
|
|
|
|
|
} |
48
|
0
|
|
|
|
|
|
return 0; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
# Preloaded methods go here. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
__END__ |