line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Search::InvertedIndex::AutoLoader; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# $RCSfile: AutoLoader.pm,v $ $Revision: 1.2 $ $Date: 1999/06/15 22:31:07 $ $Author: snowhare $ |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Search::InvertedIndex::AutoLoader - A manager for autoloading Search::InvertedIndex modules |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use Search::InvertedIndex::AutoLoader; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 DESCRIPTION |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Sets up the autoloader to load the modules in the Search::InvertedIndex |
16
|
|
|
|
|
|
|
system on demand. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 CHANGES |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1.01 Added Search::InvertedIndex::DB::Mysql to the list of autoloaded modules |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=cut |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$VERSION = "1.01"; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
my $_autoloaded_functions = {}; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
my (@packageslist) =( |
29
|
|
|
|
|
|
|
'Search::InvertedIndex', |
30
|
|
|
|
|
|
|
'Search::InvertedIndex::DB::DB_File_SplitHash', |
31
|
|
|
|
|
|
|
'Search::InvertedIndex::DB::Mysql', |
32
|
|
|
|
|
|
|
'Search::InvertedIndex::Update', |
33
|
|
|
|
|
|
|
'Search::InvertedIndex::Query', |
34
|
|
|
|
|
|
|
'Search::InvertedIndex::Query::Leaf', |
35
|
|
|
|
|
|
|
'Search::InvertedIndex::Result', |
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my ($autoloader) =<<'EOF'; |
39
|
|
|
|
|
|
|
package ----packagename----; |
40
|
|
|
|
|
|
|
sub AUTOLOAD { |
41
|
|
|
|
|
|
|
return if ($AUTOLOAD =~ m/::(END|DESTROY)$/o); |
42
|
|
|
|
|
|
|
if (exists $_autoloaded_functions->{$AUTOLOAD}) { |
43
|
|
|
|
|
|
|
die("Attempted to autoload function '$AUTOLOAD' more than once - does it exist?\n"); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
$_autoloaded_functions->{$AUTOLOAD} = 1; |
46
|
|
|
|
|
|
|
my ($packagename) = $AUTOLOAD =~ m/^(.*)::[A-Z_][A-Z0-9_]*$/ois; |
47
|
|
|
|
|
|
|
eval ("use $packagename;"); |
48
|
|
|
|
|
|
|
if ($@ ne '') { |
49
|
|
|
|
|
|
|
die ("Unable to use packagename: $@\n"); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
goto &$AUTOLOAD; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
EOF |
55
|
|
|
|
|
|
|
my ($fullload) =''; |
56
|
|
|
|
|
|
|
my ($packagename); |
57
|
|
|
|
|
|
|
foreach $packagename (@packageslist) { |
58
|
|
|
|
|
|
|
my ($loader) = $autoloader; |
59
|
|
|
|
|
|
|
$loader =~ s/(----packagename----)/$packagename/; |
60
|
|
|
|
|
|
|
$fullload .= $loader; |
61
|
|
|
|
|
|
|
} |
62
|
1
|
0
|
|
1
|
|
3746
|
eval ($fullload); |
|
0
|
0
|
|
0
|
|
0
|
|
|
0
|
0
|
|
0
|
|
0
|
|
|
0
|
0
|
|
0
|
|
0
|
|
|
0
|
0
|
|
11
|
|
0
|
|
|
0
|
0
|
|
0
|
|
0
|
|
|
0
|
0
|
|
0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
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
if ($@ ne '') { |
64
|
|
|
|
|
|
|
die ("Failed to initialize AUTOLOAD: $@\n"); |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 COPYRIGHT |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Copyright 1999, Benjamin Franz () and |
70
|
|
|
|
|
|
|
FreeRun Technologies, Inc. (). All Rights Reserved. |
71
|
|
|
|
|
|
|
This software may be copied or redistributed under the same terms as Perl itelf. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 AUTHOR |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Benjamin Franz |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 TODO |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Nothing. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=cut |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
1; |