ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/Interface.pm
Revision: 1.3
Committed: Thu Mar 18 10:32:03 1999 UTC (26 years, 1 month ago) by williamc
Content type: text/plain
Branch: MAIN
CVS Tags: ProtoEnd, V0_10_19, V0_10_18, V0_10_17, V0_10_16, V0_10_15, V0_10_14, V0_10_13, V0_10_12, V0_10_11, V0_10_10, V0_10_9, V0_10_8, V0_10_7, V0_10_6, V0_10_5, V0_10_4, V0_10_3, V0_10_2, V0_10_1, V0_10_0, V0_10_0beta, V0_9_42, V0_9_41, V0_9_40, V0_9_39, V0_9_38, V0_9_37, V0_9_36, V0_9_35, V0_9_34, V0_9_33, V0_9_32, V0_9_31, V0_9_30, V0_9_29, V0_9_28, V0_9_27, V0_9_26, V0_9_25, V0_9_24, V0_9_23, V0_9_22, V0_9_21, V0_9_20, V0_9_19, V0_9_18, V0_9_17, V0_9_16, V0_9_15, V0_9_14, V0_9_13, V0_9_12, V0_9_11, V0_9_10, V0_9_9, V0_9_8, V0_9_7, V0_9_6, V0_9_5, V0_9_4, V0_9_3, V0_9_2, V0_9_1, V0_9, V0_8, V0_7, V0_6, V0_5, V0_4, V0_3, V0_2, V0_1
Branch point for: V0_9branch
Changes since 1.2: +1 -1 lines
Log Message:
Remove all subroutine templates - causing problems and not really needed to implement properly

File Contents

# User Rev Content
1 williamc 1.1 package Interface;
2 williamc 1.2 require 5.001;
3 williamc 1.1 require Exporter;
4     require BuildFile;
5     @ISA = qw(Exporter);
6     @EXPORT = qw( GetClass $ClassDir $Class);
7    
8 williamc 1.3 sub GetClass {
9 williamc 1.1 my $dirname = shift;
10     $Class="DEFAULT";
11     $ClassDir="";
12    
13     #return if $dirname eq "";
14     @DIRA=split /\//, $dirname;
15    
16     $thispath=".";
17     # bootstrap from project buildfile if it exists
18     BuildFile::CheckBuildFile($ENV{projconfigdir});
19    
20     my @ClassPaths=split /:/, $BuildFile::BlockClassPath;
21     foreach $BClassPath ( @ClassPaths ) {
22     next if ( $BClassPath eq "");
23     push @LoBCA, [ split /\//, $BClassPath ];
24     }
25     for ( $i=0; $i<=$#DIRA; $i++ ) {
26     $thispath=$thispath."/".$DIRA[$i];
27     if ( ($ClassName=BuildFile::CheckBuildFile($thispath)) ne "" ) {
28     $Class=$ClassName;
29     $ClassDir=$thispath;
30     }
31     # TODO --- Must test against position of last new BlockCaseA
32     # Need to reset array LoBCA to the New BlockPath
33     # - merge and replace options
34     #
35     else {
36     foreach $BlockClassA ( @LoBCA ) {
37     if ( $$BlockClassA[0]=~/^$DIRA[$i]\+/ ) {
38     $$BlockClassA[0]=~s/^$DIRA[$i]//;
39     }
40     if ( $$BlockClassA[0]=~/^\+/ ) {
41     ($Class=$$BlockClassA[0])=~s/^\+//;
42     $ClassDir=$thispath;
43     shift @$BlockClassA;
44     }
45     else {
46     @$BlockClassA=();
47     }
48     }
49     }
50     }
51     $ClassDir=~s/^\.\///;
52     }