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

Comparing COMP/SCRAM/src/BuildSystem/ToolDoc.pm (file contents):
Revision 1.1.2.14 by williamc, Thu Jun 22 08:41:52 2000 UTC vs.
Revision 1.1.2.14.2.1 by williamc, Thu Aug 10 12:44:37 2000 UTC

# Line 26 | Line 26 | sub new {
26          my $class=shift;
27          $self={};
28          bless $self, $class;
29 +        $self->{cache}=shift;
30 +        $self->{mydoctype}="BuildSystem::ToolDoc";
31 +        $self->{mydocversion}="1.0";
32          $self->init();
33          return $self;
34   }
# Line 100 | Line 103 | sub setup {
103          $self->{tool}->version($version);
104          $self->{switch}->filetoparse($file);
105          $self->{toolfound}=1;
106 +        # -- check the type of document - can we parse it?
107 +        my($doctype,$docversion)=$self->{switch}->doctype();
108 +        if ( ($doctype ne $self->{mydoctype}) ||
109 +                ($self->{mydocversion} ne $docversion) ) {
110 +          $self->error("Unable to Parse Document of type $doctype $docversion".
111 +                "\n(Only ".$self->{mydoctype}." ". $self->{mydocversion}.")");
112 +        }
113          $self->{switch}->parse("setup");
114          return $self->{toolfound};
115   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines