line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Eidolon::Core::Registry; |
2
|
|
|
|
|
|
|
# ============================================================================== |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# Eidolon |
5
|
|
|
|
|
|
|
# Copyright (c) 2009, Atma 7 |
6
|
|
|
|
|
|
|
# --- |
7
|
|
|
|
|
|
|
# Eidolon/Core/Registry.pm - global registry |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# ============================================================================== |
10
|
|
|
|
|
|
|
|
11
|
3
|
|
|
3
|
|
151122
|
use base qw/Class::Accessor::Fast/; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
7157
|
|
12
|
3
|
|
|
3
|
|
13242
|
use warnings; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
89
|
|
13
|
3
|
|
|
3
|
|
17
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
616
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw/cgi config loader/); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our ($VERSION, $INSTANCE); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$VERSION = "0.02"; # 2009-05-12 06:28:11 |
20
|
|
|
|
|
|
|
$INSTANCE = undef; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------ |
23
|
|
|
|
|
|
|
# \% new() |
24
|
|
|
|
|
|
|
# constructor |
25
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------ |
26
|
|
|
|
|
|
|
sub new |
27
|
|
|
|
|
|
|
{ |
28
|
0
|
|
|
0
|
1
|
0
|
my ($class, $self); |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
0
|
$class = shift; |
31
|
0
|
|
|
|
|
0
|
$self = {}; |
32
|
0
|
|
|
|
|
0
|
bless $self, $class; |
33
|
0
|
|
|
|
|
0
|
$INSTANCE = $self; |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
0
|
return $self; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------ |
39
|
|
|
|
|
|
|
# \% get_instance() |
40
|
|
|
|
|
|
|
# get instance |
41
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------ |
42
|
|
|
|
|
|
|
sub get_instance |
43
|
|
|
|
|
|
|
{ |
44
|
1
|
|
|
1
|
1
|
3
|
return $INSTANCE; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------ |
48
|
|
|
|
|
|
|
# free() |
49
|
|
|
|
|
|
|
# free variables |
50
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------ |
51
|
|
|
|
|
|
|
sub free |
52
|
|
|
|
|
|
|
{ |
53
|
0
|
|
|
0
|
1
|
|
delete $_[0]->{"cgi"}; |
54
|
0
|
|
|
|
|
|
delete $_[0]->{"loader"}; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |