| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package OOP; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
4318
|
use OOP::Constructor; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
36
|
|
|
4
|
1
|
|
|
1
|
|
925
|
use OOP::Accessor; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
50
|
|
|
5
|
|
|
|
|
|
|
@ISA = qw(OOP::Constructor OOP::Accessor); |
|
6
|
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
6
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
224
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#*************************************************************************** |
|
10
|
|
|
|
|
|
|
############################################################################ |
|
11
|
|
|
|
|
|
|
#*[OOP]********************************************************************* |
|
12
|
|
|
|
|
|
|
# |
|
13
|
|
|
|
|
|
|
# Author : Milan Adamovsky |
|
14
|
|
|
|
|
|
|
# Date : 01/14/2008 |
|
15
|
|
|
|
|
|
|
# Updated : 04/03/2008 |
|
16
|
|
|
|
|
|
|
# |
|
17
|
|
|
|
|
|
|
# Version : 1.01 |
|
18
|
|
|
|
|
|
|
# |
|
19
|
|
|
|
|
|
|
# Copyright 2007-Present Milan Adamovsky. All rights reserved. |
|
20
|
|
|
|
|
|
|
# It may be used and modified freely, but I do request that this copyright |
|
21
|
|
|
|
|
|
|
# notice remain attached to the file. You may modify this module as you |
|
22
|
|
|
|
|
|
|
# wish, but if you redistribute a modified version, please attach a note |
|
23
|
|
|
|
|
|
|
# listing the modifications you have made. |
|
24
|
|
|
|
|
|
|
# |
|
25
|
|
|
|
|
|
|
# Purpose : This class (module) provides a developer with various methods |
|
26
|
|
|
|
|
|
|
# that enforce uniform OOP conventions and ensure sound OOP |
|
27
|
|
|
|
|
|
|
# development in PERL. |
|
28
|
|
|
|
|
|
|
# |
|
29
|
|
|
|
|
|
|
# Usage : For a full detailed usage of this class, please refer to the |
|
30
|
|
|
|
|
|
|
# POD found attached below. To read it simply type the command |
|
31
|
|
|
|
|
|
|
# 'perldoc OOP' at the command-prompt or simply scroll down. |
|
32
|
|
|
|
|
|
|
# |
|
33
|
|
|
|
|
|
|
# History : 04/03/2008 - Version 1.01 |
|
34
|
|
|
|
|
|
|
# Fixed logic that if a dataType is a hash with a writeAccess |
|
35
|
|
|
|
|
|
|
# of '1', that any elements not specified in the value can be |
|
36
|
|
|
|
|
|
|
# added dynamically and do not have to be explicitly specified. |
|
37
|
|
|
|
|
|
|
# Added missing EXISTS to _getArgs.pm |
|
38
|
|
|
|
|
|
|
# |
|
39
|
|
|
|
|
|
|
#*************************************************************************** |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
$OOP::VERSION='1.01'; |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub new { |
|
44
|
|
|
|
|
|
|
|
|
45
|
4
|
|
|
4
|
0
|
226
|
my ($class, $ARGS) = (@_); |
|
46
|
|
|
|
|
|
|
|
|
47
|
4
|
|
|
|
|
10
|
my $self = bless {}, $class; |
|
48
|
|
|
|
|
|
|
|
|
49
|
4
|
|
|
|
|
25
|
$self->{PROPERTIES} = $self->set_args($ARGS); |
|
50
|
|
|
|
|
|
|
|
|
51
|
4
|
|
|
|
|
12
|
return $self; |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
#*************************************************************************** |
|
56
|
|
|
|
|
|
|
#*[_init]******************************************************************* |
|
57
|
|
|
|
|
|
|
# PLACEHOLDER FOR FUTURE . NOT USED UNTIL THIS NOTICE IS REMOVED! |
|
58
|
|
|
|
|
|
|
sub _init |
|
59
|
|
|
|
|
|
|
{ |
|
60
|
|
|
|
|
|
|
|
|
61
|
1
|
|
|
1
|
|
7
|
no strict; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
385
|
|
|
62
|
|
|
|
|
|
|
|
|
63
|
0
|
|
|
0
|
|
|
my ($self, $ARGS) = @_; |
|
64
|
|
|
|
|
|
|
|
|
65
|
0
|
|
|
|
|
|
my $caller = $ARGS->{caller}; |
|
66
|
0
|
|
|
|
|
|
my $callerPkg = ref $ARGS->{caller}; |
|
67
|
0
|
|
|
|
|
|
my $pluginFolder = "./$callerPkg/Core"; |
|
68
|
|
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
my $obj; |
|
70
|
|
|
|
|
|
|
|
|
71
|
0
|
|
|
|
|
|
opendir(COMPONENTS, $pluginFolder); |
|
72
|
0
|
|
|
|
|
|
my @files = readdir(COMPONENTS); |
|
73
|
0
|
|
|
|
|
|
closedir(COMPONENTS); |
|
74
|
|
|
|
|
|
|
|
|
75
|
0
|
|
|
|
|
|
map { |
|
76
|
0
|
|
|
|
|
|
/(.*)\.pm/; |
|
77
|
0
|
|
|
|
|
|
my $cpy = $1; |
|
78
|
|
|
|
|
|
|
|
|
79
|
0
|
0
|
|
|
|
|
if ($cpy) |
|
80
|
|
|
|
|
|
|
{ |
|
81
|
0
|
0
|
|
|
|
|
($cpy->use && print "Loading " . $cpy . " version "); |
|
82
|
0
|
|
|
|
|
|
$obj = $cpy->new($caller); |
|
83
|
|
|
|
|
|
|
|
|
84
|
0
|
0
|
|
|
|
|
if ($obj->{inherit}) |
|
85
|
|
|
|
|
|
|
{ |
|
86
|
0
|
|
|
|
|
|
push(@$callerPkg::ISA, $cpy) |
|
87
|
|
|
|
|
|
|
} |
|
88
|
|
|
|
|
|
|
|
|
89
|
0
|
|
|
|
|
|
$caller->{CORE}->{$cpy} = $obj; |
|
90
|
|
|
|
|
|
|
|
|
91
|
0
|
|
|
|
|
|
print ${$cpy.'::VERSION'} . "... "; |
|
|
0
|
|
|
|
|
|
|
|
92
|
0
|
|
|
|
|
|
print "Ok.\n"; |
|
93
|
|
|
|
|
|
|
} |
|
94
|
|
|
|
|
|
|
} @files; |
|
95
|
|
|
|
|
|
|
|
|
96
|
0
|
|
|
|
|
|
return(); |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
} |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
1; |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
__END__ |