dougm 01/03/12 17:47:24
Modified: lib/ModPerl MapUtil.pm StructureMap.pm TypeMap.pm
Log:
allow util/source_scan.pl to run without function and structure tables
(when ModPerl::FunctionMap->prefixes is called)
Revision Changes Path
1.2 +3 -0 modperl-2.0/lib/ModPerl/MapUtil.pm
Index: MapUtil.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/MapUtil.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MapUtil.pm 2001/03/05 03:46:32 1.1
+++ MapUtil.pm 2001/03/13 01:47:22 1.2
@@ -23,6 +23,8 @@
sub function_table {
return $function_table if @$function_table;
+ require Apache::FunctionTable;
+ require ModPerl::FunctionTable;
@$function_table = (@$Apache::FunctionTable, @$ModPerl::FunctionTable);
$function_table;
}
@@ -31,6 +33,7 @@
sub structure_table {
return $structure_table if @$structure_table;
+ require Apache::StructureTable;
@$structure_table = (@$Apache::StructureTable);
$structure_table;
}
1.2 +4 -5 modperl-2.0/lib/ModPerl/StructureMap.pm
Index: StructureMap.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/StructureMap.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StructureMap.pm 2001/03/05 03:45:47 1.1
+++ StructureMap.pm 2001/03/13 01:47:22 1.2
@@ -2,8 +2,7 @@
use strict;
use warnings FATAL => 'all';
-use Apache::StructureTable ();
-use ModPerl::MapUtil ();
+use ModPerl::MapUtil qw(structure_table);
our @ISA = qw(ModPerl::MapBase);
@@ -16,7 +15,7 @@
my $self = shift;
my $map = $self->get;
- for my $entry (@$Apache::StructureTable) {
+ for my $entry (@{ structure_table() }) {
my $type = $entry->{type};
my $elts = $entry->{elts};
@@ -42,7 +41,7 @@
my @missing;
- for my $entry (@$Apache::StructureTable) {
+ for my $entry (@{ structure_table() }) {
my $type = $entry->{type};
for my $name (map $_->{name}, @{ $entry->{elts} }) {
@@ -59,7 +58,7 @@
my $self = shift;
my %structures;
- for my $entry (@$Apache::StructureTable) {
+ for my $entry (@{ structure_table() }) {
$structures{ $entry->{type} } = { map {
$_->{name}, 1
} @{ $entry->{elts} } };
1.2 +0 -2 modperl-2.0/lib/ModPerl/TypeMap.pm
Index: TypeMap.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/TypeMap.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TypeMap.pm 2001/03/05 03:45:23 1.1
+++ TypeMap.pm 2001/03/13 01:47:23 1.2
@@ -3,8 +3,6 @@
use strict;
use warnings FATAL => 'all';
-use Apache::StructureTable ();
-use Apache::FunctionTable ();
use ModPerl::FunctionMap ();
use ModPerl::StructureMap ();
use ModPerl::MapUtil qw(list_first);