ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/ActiveConfig.pm
Revision: 1.2
Committed: Thu Jan 20 18:18:45 2000 UTC (25 years, 3 months ago) by williamc
Content type: text/plain
Branch: MAIN
CVS Tags: v102p1, V1_0_1, V1_0_0, V1_pre0, SCRAM_V1, SCRAMV1_IMPORT, V0_19_7, V0_19_6, V0_19_6p1, V0_19_5, SFATEST, V0_19_4, V0_19_4_pre3, V0_19_4_pre2, V0_19_4_pre1, V0_19_3, V0_19_2, V0_19_1, V0_19_0, V0_18_5, V0_18_4, V_18_3_TEST, VO_18_3, V0_18_2, V0_18_1, ProtoEnd
Branch point for: V1_pre1, SCRAM_V1_BRANCH, V0_19_4_B
Changes since 1.1: +9 -0 lines
Log Message:
HIP additions

File Contents

# User Rev Content
1 williamc 1.1 #
2     # ActiveConfig.pm
3     #
4     # Originally Written by Christopher Williams
5     #
6     # Description
7     #
8     # Interface
9     # ---------
10     # new(directory) : A new ActiveConfig object
11     # cache() : Return the cache
12     # store(object,@keys) :
13     # find (@keys) :
14 williamc 1.2 # basedoc() : set/return the base doc
15 williamc 1.1
16     package ActiveDoc::ActiveConfig;
17     require 5.004;
18     use URL::URLcache;
19     use ObjectUtilities::ObjectStore;
20    
21     sub new {
22     my $class=shift;
23     $self={};
24     bless $self, $class;
25     $self->init(@_);
26     return $self;
27     }
28    
29     sub init {
30     my $self=shift;
31     my $dir=shift;
32    
33     $self->{objectstore}=ObjectUtilities::ObjectStore->
34     new($dir."/ObjectStore", $self);
35     $self->{cache}=URL::URLcache->new($dir."/cache");
36     }
37    
38 williamc 1.2 sub basedoc {
39     my $self=shift;
40    
41     @_?$self->{basedoc}=shift
42     :$self->{basedoc};
43     }
44    
45 williamc 1.1 sub cache {
46     my $self=shift;
47     return $self->{cache};
48     }
49    
50     sub AUTOLOAD { # Call any method in the ObjectStore directly
51     my $self=shift;
52     my $call;
53    
54     # dont propogate a destroy method
55     return if $AUTOLOAD=~/::DESTROY$/;
56    
57     ($call=$AUTOLOAD)=~s/^.*:://;
58 williamc 1.2 # print "Calling $call from ".$self->{objectstore}."\n";
59 williamc 1.1 return $self->{objectstore}->$call(@_);
60     }