/
dependencies.plx
executable file
·138 lines (128 loc) · 2.55 KB
/
dependencies.plx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#!perl -w
# we could probably add these in automatically with some work, but it
# would be somewhat unreliable, so we need to keep this file up to date
# just record what module depends on what ... ha ha ha
use Data::Dumper;
my %data = (
'Slash' => [qw(
Slash::Constants
Slash::DB
Slash::Display
Slash::Utility
)],
'Slash::Apache' => [qw(
Slash
Slash::DB
Slash::Display
Slash::Utility
)],
'Slash::Apache::Log' => [qw(
Slash::Utility
)],
'Slash::Apache::User' => [qw(
Slash
Slash::Apache
Slash::Utility
)],
'Slash::Constants' => [qw(
)],
'Slash::DB' => [qw(
Slash::DB::Utility
)],
'Slash::DB::MySQL' => [qw(
Slash::DB
Slash::DB::Utility
Slash::Utility
)],
'Slash::DB::Static::MySQL' => [qw(
Slash::DB::Utility
Slash::Utility
)],
'Slash::DB::Utility' => [qw(
Slash::Utility
)],
'Slash::Display' => [qw(
Slash::Display::Provider
Slash::Utility::Data
Slash::Utility::Environment
Slash::Utility::System
)],
'Slash::Display::Plugin' => [qw(
Slash
Slash::Utility
)],
'Slash::Display::Provider' => [qw(
Slash::Utility::Environment
)],
'Slash::Install' => [qw(
Slash
Slash::DB
Slash::DB::Utility
)],
'Slash::Test' => [qw(
Slash
Slash::Constants
Slash::Display
Slash::Utility
Slash::XML
)],
'Slash::Utility' => [qw(
Slash::Utility::Access
Slash::Utility::Anchor
Slash::Utility::Data
Slash::Utility::Display
Slash::Utility::Environment
Slash::Utility::System
)],
'Slash::Utility::Access' => [qw(
Slash::Display
Slash::Utility::Data
Slash::Utility::System
Slash::Utility::Environment
)],
'Slash::Utility::Anchor' => [qw(
Slash::Display
Slash::Utility::Data
Slash::Utility::Display
Slash::Utility::Environment
)],
'Slash::Utility::Data' => [qw(
Slash::Constants
Slash::Utility::Environment
)],
'Slash::Utility::Display' => [qw(
Slash::Display
Slash::Utility::Data
Slash::Utility::Environment
)],
'Slash::Utility::Environment' => [qw(
)],
'Slash::Utility::System' => [qw(
Slash::Utility::Environment
)],
);
for my $class (keys %data) {
my $aref = $data{$class};
$data{$class} = { map { ($_ => 1) } @$aref };
}
my %checked;
for my $class (keys %data) {
for my $sub (keys %{$data{$class}}) {
check($class, $sub, [$class, $sub]);
}
}
print "All OK!\n";
sub check {
my($class, $sub, $trace) = @_;
return if $checked{$class,$sub};
$checked{$class,$sub}++;
for (keys %{$data{$sub}}) {
my $ntrace = [@$trace, $_, $class];
local $" = " =>\n\t";
if (exists $data{$_}{$class}) {
die "damn:\n\t@$ntrace\n";
}
check($class, $_, [@$trace, $_]);
}
}
__END__