ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/ActiveDoc.pm
(Generate patch)

Comparing COMP/SCRAM/src/ActiveDoc/ActiveDoc.pm (file contents):
Revision 1.18 by williamc, Wed Jan 26 12:28:06 2000 UTC vs.
Revision 1.19 by williamc, Thu Jan 27 17:50:38 2000 UTC

# Line 20 | Line 20
20   # includeparse(local_parsename, objparsename, activedoc) : copy the parse from
21   #                                                       one object to another
22   # currentparsename([name]) : get/set current parse name
23 # newdoc(file)  : Return an new object of the appropriate type
23   # getfile(url)  : get a processedfile object given a url
24   # activatedoc(url) : Return the object ref for a doc described by the given url
25   #                    -- any parse called "init" will also be run
# Line 66 | Line 65 | sub new {
65               $self->copydocquery($basedoc);
66             }
67             else {
68 <             $self->error("Error : No base doc found");
68 >             $self->error("ActiveDoc Error : No base doc found");
69             }
70          }
71          $self->_init2();
# Line 185 | Line 184 | sub copydocquery {
184          my $self=shift;
185          my $ActiveDoc=shift;
186  
187 <        $self->basequery($ActiveDoc->basequery());
187 >        if ( defined $ActiveDoc->basequery() ) {
188 >          $self->basequery($ActiveDoc->basequery());
189 >        }
190 >        else {
191 >          $self->error("Cannot copy basequery - undefined");
192 >        }
193   }
194  
195   sub config {
# Line 198 | Line 202 | sub basequery {
202          my $self=shift;
203          @_ ? $self->{Query}=shift
204             : $self->{Query};
205 +        return $self->{Query};
206   }
207  
208   sub option {
# Line 379 | Line 384 | sub Base_end {
384          my $type;
385  
386          if ( $#{$self->{basestack}} == -1 ) {
387 <                print "Parse Error : unmatched </".$name."> on line ".
383 <                        $self->line()."\n";
384 <                die;
387 >                $self->parseerror("Parse Error : unmatched </$name>");
388          }
389          else {
390            $type = pop @{$self->{basestack}};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines