Revision: | 1.3 |
Committed: | Thu Jan 27 17:50:39 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.2: | +9 -0 lines |
Log Message: | Many mods for BootStrapping |
# | User | Rev | Content |
---|---|---|---|
1 | williamc | 1.1 | # |
2 | # StarterDoc.pm - An active Document | ||
3 | # | ||
4 | # Originally Written by Christopher Williams | ||
5 | # | ||
6 | # Description | ||
7 | williamc | 1.2 | # ----------- |
8 | # define a base document from which to get default ActiveDoc parameters | ||
9 | # One of these need to be instantiated for each configuration area | ||
10 | williamc | 1.1 | # |
11 | # Interface | ||
12 | # --------- | ||
13 | williamc | 1.2 | # new(ActiveConfig,userinterface,userquery) : A new StarterDoc object |
14 | williamc | 1.1 | |
15 | package ActiveDoc::StarterDoc; | ||
16 | require 5.001; | ||
17 | use ActiveDoc::ActiveDoc; | ||
18 | use ActiveDoc::ActiveConfig; | ||
19 | use ActiveDoc::Query; | ||
20 | use URL::URLcache; | ||
21 | use ObjectUtilities::ObjectStore; | ||
22 | |||
23 | @ISA=qw(ActiveDoc::ActiveDoc); | ||
24 | |||
25 | sub new { | ||
26 | my $class=shift; | ||
27 | $self={}; | ||
28 | bless $self, $class; | ||
29 | $self->_init(@_); | ||
30 | return $self; | ||
31 | } | ||
32 | |||
33 | sub _init { | ||
34 | my $self=shift; | ||
35 | williamc | 1.2 | my $config=shift; |
36 | my $userinterface=shift; | ||
37 | williamc | 1.1 | my $userquery=shift; |
38 | |||
39 | williamc | 1.2 | #-- All comunication with the outside world through userquery object |
40 | williamc | 1.1 | $self->{Query}=$userquery; |
41 | $self->userinterface($userinterface); | ||
42 | |||
43 | # set up default Configurations | ||
44 | williamc | 1.2 | $self->{ActiveConfig}=$config; |
45 | $self->{ActiveConfig}->basedoc($self); # register as the basedoc | ||
46 | $self->_init2();#add a few things all docs should have | ||
47 | williamc | 1.1 | $self->init(); |
48 | } | ||
49 | |||
50 | sub init { | ||
51 | # dummy to be overriden | ||
52 | } | ||
53 | williamc | 1.3 | |
54 | |||
55 | # | ||
56 | # oveerride the parseerror method so initiating calls dont break due to no url | ||
57 | # | ||
58 | sub parseerror { | ||
59 | my $self=shift; | ||
60 | $self->error(@_); | ||
61 | } |