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

Comparing COMP/SCRAM/src/BuildSystem/Requirements.pm (file contents):
Revision 1.1.2.4.2.4 by williamc, Mon Aug 21 16:32:35 2000 UTC vs.
Revision 1.1.2.4.2.6 by williamc, Mon Aug 21 18:41:03 2000 UTC

# Line 2 | Line 2
2   #
3   # Interface
4   # ---------
5 < # new(file,URLcache,ObjectStore)     : new requirements doc
5 > # new(url,URLcache,ObjectStore)     : new requirements doc
6   # setup(toolbox): set up the requirements into the specified toolbox object
7   # download(toolbox)    : download description files (into toolbox cache)
8   # tools()       : Return list of requirements (ordered)
# Line 60 | Line 60 | sub url {
60  
61   sub init {
62          my $self=shift;
63 <        my $file=shift;
63 >        my $url=shift;
64  
65 <        my $switch=ActiveDoc::ActiveDoc->new($self->{cache});
66 <        $switch->filetoparse($file);
67 <        $switch->newparse("doc");
68 <        $switch->addtag("doc","Doc", \&Doc_start,$self,"",$self,"",$self);
65 >        my $switch=ActiveDoc::ActiveDoc->new($self->{cache},$self->{dbstore});
66 >        $switch->verbosity($self->verbosity());
67 >        $switch->url($url);
68          $switch->newparse("ordering");
69          $switch->addbasetags("ordering");
70          $switch->addtag("ordering","Architecture",
# Line 81 | Line 80 | sub init {
80          $self->{switch}=$switch;
81          @{$self->{tools}}=();
82          
83 <        $self->{switch}->parse("doc");
83 >        my($doctype,$docversion)=$switch->doctype();
84          # -- for backwards compatability only parse if we have a docversion
85          #    defined
86 <        if ( defined $self->{docversion} ) {
87 <          if ( $self->{docversion} eq $self->{mydocversion} ) {
86 >        if ( defined $docversion ) {
87 >          if ( $docversion eq $self->{mydocversion} ) {
88              $self->{switch}->parse("ordering");
89            }
90          }
# Line 107 | Line 106 | sub download {
106  
107   # ---- Tag routines
108  
110 sub Doc_start {
111        my $self=shift;
112        my $name=shift;
113        my $hashref=shift;
114
115        $self->{switch}->checktag( $name, $hashref, 'type');
116        $self->{switch}->checktag( $name, $hashref, 'version');
117
118        $self->{docversion}=$$hashref{'version'};
119 }
120
109   sub require_start {
110          my $self=shift;
111          my $name=shift;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines