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.13 by sashby, Mon Apr 29 16:09:23 2002 UTC vs.
Revision 1.23 by sashby, Tue Feb 27 11:59:44 2007 UTC

# Line 15 | Line 15
15   # distributionurl(tool,version) : return the dist info url for the tool
16  
17   package BuildSystem::Requirements;
18 +
19 + BEGIN
20 +   {
21 +   die "\n\n".__PACKAGE__.": this package has been moved to Configuration::Requirements. This one is obsolete and can be removed.\n\n";
22 +   }
23 +
24   use ActiveDoc::ActiveDoc;
25   use Utilities::Verbose;
26  
27   require 5.004;
28   @ISA=qw(Utilities::Verbose);
29 + $BuildSystem::Requirements::self;
30  
31 < sub new {
25 <        my $class=shift;
26 <        my $self={};
27 <        bless $self, $class;
28 <        $self->{dbstore}=shift;
29 <        $self->{file}=shift;
30 <        $self->{cache}=$self->{dbstore}->cache();
31 <        if ( @_ ) {
32 <          $self->arch(shift);
33 <        }
34 <        $self->verbose("Initialising a new Requirements Doc");
35 <        $self->{mydocversion}="2.0";
36 <        $self->{Arch}=1;
37 <        push @{$self->{ARCHBLOCK}}, $self->{Arch};
38 <        $self->init($self->{file});
39 <        return $self;
40 < }
41 <
42 < sub url {
43 <        my $self=shift;
44 <        if ( @_ ) {
45 <          $self->{file}=shift;
46 <        }
47 <        return $self->{file}
48 < }
49 <
50 < sub setup
31 > sub new
32     {
33 <   my $self=shift;
34 <   my $toolbox=shift;
35 <   my $tool;
33 >   my $class=shift;
34 >   # Initialise the global package variable:
35 >   no strict 'refs';
36 >   $self = defined $self ? $self
37 >      : (bless {}, $class );
38 >   $self->{dbstore}=shift;
39 >   $self->{file}=shift;
40 >   $self->{cache}=$self->{dbstore}->cache();
41  
42 <   foreach $tool ( $self->selectedtools() )
42 >   if ( @_ )
43        {
44 <      $self->verbose("Setting Up Tool $tool");
59 <      $toolbox->toolsetup($tool, $self->version($tool), $self->toolurl($tool));
44 >      $self->arch(shift);
45        }
46 +   $self->verbose("Initialising a new Requirements Doc");
47 +   $self->{mydoctype} = "BuildSystem::Requirements";
48 +   $self->{mydocversion}="2.0";
49 +   # Counter for downloaded tools: zero it here. It will
50 +   # be auto-incremented as each tool is selected:
51 +   $self->{selectcounter}=0;
52 +  
53 +   $self->{Arch}=1;
54 +   push @{$self->{ARCHBLOCK}}, $self->{Arch};
55 +   $self->init($self->{file});
56 +   return $self;
57     }
58  
59 < sub tools {
60 <        my $self=shift;
61 <        return @{$self->{tools}};
62 < }
59 > sub toolmanager
60 >   {
61 >   my $self=shift;
62 >  
63 >   @_ ? $self->{toolmanagerobject} = shift
64 >      : $self->{toolmanagerobject};
65 >  
66 >   }
67  
68 + sub configversion
69 +   {
70 +   my $self=shift;
71 +   @_ ? $self->{configversion} = shift
72 +      : $self->{configversion};
73 +   }
74  
75 < sub selectedtools
75 > sub url
76     {
71   ###############################################################
72   # selectedtools()                                             #
73   ###############################################################
74   # modified : Wed Dec  5 15:39:39 2001 / SFA                   #
75   # params   :                                                  #
76   #          :                                                  #
77   #          :                                                  #
78   #          :                                                  #
79   # function : New version of routine. Return a list of tools   #
80   #          : that were selected after parsing RequirementsDoc #
81   #          :                                                  #
82   #          :                                                  #
83   ###############################################################
77     my $self=shift;
85   my @toolarray = ();
78    
79 <   # Grab the arrays of tools:
80 <   my ($toolref,$deseltoolref,$unseltoolref) = $self->grabtools();
79 >   if ( @_ )
80 >      {
81 >      $self->{file}=shift;
82 >      }
83 >   return $self->{file};
84 >   }
85 >
86 > sub tools
87 >   {
88 >   my $self=shift;
89 >   return @{$self->{tools}};
90 >   }
91 >
92 > sub toolcomment
93 >   {
94 >   my $self=shift;
95 >   my $tool=shift;
96 >   my $version=shift;
97    
98 <   my @tools = @{$toolref};
99 <   my @deseltools = @{$deseltoolref};
100 <   my @unseltools = @{$unseltoolref};
98 >   return $self->{reqtext}{$tool}{$version};
99 >   }
100 >
101 > sub distributionurl
102 >   {
103 >   my $self=shift;
104 >   my $tool=shift;
105 >   my $version=shift;
106    
107 <   if ($#tools == -1)
107 >   return ( defined $self->{dist}{$tool}{$version})?
108 >      $self->{dist}{$tool}{$version}:undef;
109 >   }
110 >
111 > sub version
112 >   {
113 >   my $self=shift;
114 >   my $tool=shift;
115 >   return $self->{'version'}{$tool};
116 >   }
117 >
118 > sub toolurl
119 >   {
120 >   my $self=shift;
121 >   my $tool=shift;
122 >   return $self->{'url'}{$tool};
123 >   }
124 >
125 > sub init
126 >   {
127 >   my $self=shift;
128 >   my $url=shift;
129 >   my $scramdoc=ActiveDoc::ActiveDoc->new($self->{dbstore});
130 >   $scramdoc->verbosity($self->verbosity());
131 >   $scramdoc->url($url);  
132 >   $scramdoc->newparse("ordering",$self->{mydoctype},'Subs');
133 >   $self->{reqcontext}=0;
134 >   $self->{scramdoc}=$scramdoc;
135 >   undef $self->{restrictstack};
136 >   @{$self->{tools}}=();
137 >   @{$self->{ArchStack}}=();
138 >   $self->verbose("Initial Document Parse");
139 >   $self->{scramdoc}->parse("ordering");
140 >   # Set the config version. If there isn't a version, it means that we
141 >   # have a stand-alone repository for the toolbox, rather than a CVS
142 >   # one. Hence, no CVS tag (== version):
143 >   ($scramdoc->{configurl}->param('version') eq '') ?
144 >      $self->configversion("STANDALONE") :
145 >      $self->configversion($scramdoc->{configurl}->param('version'));
146 >   }
147 >
148 > sub arch
149 >   {
150 >   my $self=shift;
151 >   # $self->arch is the SCRAM_ARCH value:
152 >   if ( @_ )
153        {
154 <      $self->verbose(">> No tools SELECTED. Checking for DESELECTED tools");
97 <      
98 <      # No tools "SELECTED". We return the tools that were "UNSELECTED"
99 <      # (these are the tools that remain after unwanted tools are deselected):
100 <      if ($#unseltools != -1)
101 <         {
102 <         $self->verbose(">> Using the tools remaining after DESELECTION ops");
103 <         # The array has elements:
104 <         return @unseltools;
105 <         }
106 <      else
107 <         {
108 <         $self->verbose(">> No UNSELECTED tools.....");
109 <         }
154 >      $self->{arch}=shift;
155        }
156     else
157        {
158 <      # We will return the selected tools but only after checking
114 <      # for subsequently deselected tools (unlikely but...):
115 <      foreach $selected (@tools)
158 >      if ( ! defined $self->{arch} )
159           {
160 <         # If the tool exists in the deselected tool array, pass.
118 <         if ( ! grep /$selected/, @deseltools)
119 <            {
120 <            push @toolarray, $selected;  
121 <            }
122 <         else
123 <            {
124 <            $self->verbose(">> Tool $selected was subsequently deselected.");
125 <            }
160 >         $self->{arch}="";
161           }
162        }
163 <   return @toolarray;
163 >   return $self->{arch};
164     }
165  
166 + sub archlist
167 +   {
168 +   my $self=shift;
169 +   return @{$self->{ArchStack}};
170 +   }
171  
172 < sub grabtools
172 > sub getreqforarch
173     {
134   ###############################################################
135   # grabtools()                                                 #
136   ###############################################################
137   # modified : Wed Dec  5 14:41:56 2001 / SFA                   #
138   # params   :                                                  #
139   #          :                                                  #
140   #          :                                                  #
141   #          :                                                  #
142   # function : Loop over the tools read from RequirementsDoc    #
143   #          : and fill arrays for selected, deselected and     #
144   #          : unselected tools.                                #
145   #          :                                                  #
146   ###############################################################
174     my $self=shift;
175 <   my @toollist=();
149 <   my @deseltoollist=();
150 <   my @unseltoollist=();
175 >   my $arch=shift;
176    
177 <   foreach $tool (  @{$self->{tools}} )
177 >   if ( ! defined $self->{reqsforarch}{$arch} )
178        {
179 <      if ( $self->{selected}{$tool} eq "SELECTED" )
180 <         {
181 <         push @toollist, $tool;
157 <         }
158 <      elsif ( $self->{selected}{$tool} eq "DESELECTED" )
159 <         {
160 <         push @deseltoollist, $tool;
161 <         }
162 <      elsif ( $self->{selected}{$tool} eq "UNSELECTED" )
163 <         {
164 <         push @unseltoollist, $tool;
165 <         }
166 <      else
167 <         {
168 <         $self->verbose(">> Looks like an unknown sel flag for tool ".$tool." ");
169 <         }
179 >      $self->{reqsforarch}{$arch}=
180 >         BuildSystem::Requirements->new($self->{dbstore},$self->{file},
181 >                                        $arch);
182        }
183 <   return \(@toollist, @deseltoollist, @unseltoollist);
183 >   return $self->{reqsforarch}{$arch};
184     }
185  
174
175 sub toolcomment {
176        my $self=shift;
177        my $tool=shift;
178        my $version=shift;
179
180        return $self->{reqtext}{$tool}{$version};
181 }
182
183 sub distributionurl {
184        my $self=shift;
185        my $tool=shift;
186        my $version=shift;
187
188        return ( defined $self->{dist}{$tool}{$version})?
189                        $self->{dist}{$tool}{$version}:undef;
190 }
191
192 sub version {
193        my $self=shift;
194        my $tool=shift;
195        return $self->{'version'}{$tool};
196 }
197
198 sub toolurl {
199        my $self=shift;
200        my $tool=shift;
201        return $self->{'url'}{$tool};
202 }
203
204 sub init {
205        my $self=shift;
206        my $url=shift;
207
208        my $switch=ActiveDoc::ActiveDoc->new($self->{dbstore});
209        $switch->verbosity($self->verbosity());
210        $switch->url($url);
211        $switch->newparse("ordering");
212        $switch->addbasetags("ordering");
213        $switch->addtag("ordering","Architecture",
214                                        \&Arch_Start,$self,
215                                        "", $self,
216                                        \&Arch_End, $self);
217        $switch->addtag("ordering","Restrict",
218                                        \&Restrict_start,$self,
219                                        "", $self,
220                                        \&Restrict_end, $self);
221        $switch->addtag("ordering","deselect",
222                                        \&deselect_start,$self,
223                                        "", $self,
224                                        "", $self);
225        $switch->addtag("ordering","select",
226                                        \&select_start,$self,
227                                        "", $self,
228                                        "", $self);
229        $switch->addtag("ordering","distribution",
230                                        \&disttag,$self);
231        $switch->grouptag("Architecture","ordering");
232        $switch->addtag("ordering","require",
233                                        \&require_start,$self,
234                                        \&require_text, $self,
235                                        \&require_end, $self);
236
237        $self->{reqcontext}=0;
238        $self->{switch}=$switch;
239        undef $self->{restrictstack};
240        @{$self->{tools}}=();
241        
242        my($doctype,$docversion)=$switch->doctype();
243        # -- for backwards compatability only parse if we have a docversion
244        #    defined
245        if ( defined $docversion ) {
246          if ( $docversion eq $self->{mydocversion} ) {
247            @{$self->{ArchStack}}=();
248            $self->verbose("Initial Document Parse");
249            $self->{switch}->parse("ordering");
250          }
251          else {
252            $self->verbose("wrong doc version - not parsing");
253          }
254        }
255        else {
256          $self->verbose("wrong doc type - not parsing");
257        }
258 }
259
260 sub arch {
261        my $self=shift;
262        if ( @_ ) {
263          $self->{arch}=shift
264        }
265        else {
266          if ( ! defined $self->{arch} ) {
267            $self->{arch}="";
268          }
269        }
270        return $self->{arch};
271 }
272
273 sub archlist {
274        my $self=shift;
275        return @{$self->{ArchStack}};
276 }
277
278 sub getreqforarch {
279        my $self=shift;
280        my $arch=shift;
281
282        if ( ! defined $self->{reqsforarch}{$arch} ) {
283          $self->{reqsforarch}{$arch}=
284                BuildSystem::Requirements->new($self->{dbstore},$self->{file},
285                                                $arch);
286        }
287        return $self->{reqsforarch}{$arch};
288 }
289
290
186   sub download
187     {
188     my $self=shift;
# Line 300 | Line 195 | sub download
195        {
196        print "#";
197        $self->verbose("Downloading ".$self->toolurl($tool));
198 <      # get into the cache
199 <      $self->{switch}->urlget($self->toolurl($tool));
198 >      # get into the cache:
199 >      $self->{scramdoc}->urlget($self->toolurl($tool));
200 >      }
201 >   print "\nDone.","\n";
202 >   # So now add the list of downloaded tools, and which were
203 >   # selected, to tool cache:
204 >   print "Tool info cached locally.","\n","\n";
205 >
206 >   # Now copy required info from this object to ToolManager (ToolCache):
207 >   $self->toolmanager()->downloadedtools($self->{tools});
208 >   $self->toolmanager()->defaultversions($self->{version});
209 >   $self->toolmanager()->toolurls($self->{url});
210 >   $self->toolmanager()->selected($self->{selected});
211 >   }
212 >
213 > #sub _autoselect
214 > #   {
215 > #   my $self=shift;
216 > #   if ( @_ )
217 > #      {
218 > #      $self->{autoselect}=shift;
219 > #      }
220 > #   # -- default is true
221 > #   return ((defined $self->{autoselect})?$self->{autoselect}:1);
222 > #   }
223 >
224 > sub require()
225 >   {
226 >   my $self=shift;
227 >   my $name=shift;
228 >   my $hashref=shift;
229 >  
230 >   $self->{scramdoc}->checktag( $name, $hashref, 'version');
231 >   $self->{scramdoc}->checktag( $name, $hashref, 'name');
232 >   $self->{scramdoc}->checktag( $name, $hashref, 'url');
233 >  
234 >   if ( $self->{reqcontext} == 1 )
235 >      {
236 >      $self->{scramdoc}->parseerror(
237 >                                  "Open new $name context without previous </$name>");
238 >      }
239 >   $self->{reqcontext}=1;
240 >   $$hashref{'name'}=~tr[A-Z][a-z];
241 >  
242 >   # Add protection so that architecture tags are obeyed during download:
243 >   if ( $self->{Arch} )
244 >      {
245 >      # Add tool to the tool array:
246 >      push @{$self->{tools}}, $$hashref{'name'};
247 >      
248 >      # If the tool already has an entry, modify the version string to
249 >      # include both versions. The versions can later be separated and
250 >      # parsed as normal:
251 >      if (defined $self->{version}{$$hashref{'name'}})
252 >         {
253 >         # Don't need an extra entry for this tool onto tool array:
254 >         pop @{$self->{tools}}, $$hashref{'name'};
255 >         # Modify the version string to append the other tool version.
256 >         # Separate using a colon:
257 >         my $newversion=$self->{version}{$$hashref{'name'}}.":".$$hashref{'version'};
258 >         $self->{version}{$$hashref{'name'}}=$newversion;
259 >         }
260 >      else
261 >         {
262 >         $self->{version}{$$hashref{'name'}}=$$hashref{'version'};
263 >         }
264 >      # -- make sure the full url is taken
265 >      my $urlobj=$self->{scramdoc}->expandurl($$hashref{'url'});
266 >      $self->{url}{$$hashref{'name'}}=$urlobj->url();
267 >
268 >      $self->{creqtool}=$$hashref{'name'};
269 >      $self->{creqversion}=$$hashref{'version'};
270 >      $self->{reqtext}{$self->{creqtool}}{$self->{creqversion}}="";
271        }
306   print "\nDone.","\n","\n";
272     }
273  
274 < sub _autoselect {
275 <        my $self=shift;
276 <        if ( @_ ) {
277 <          $self->{autoselect}=shift;
278 <        }
279 <        # -- default is true
280 <        return ((defined $self->{autoselect})?$self->{autoselect}:1);
281 < }
282 <
283 < # ---- Tag routines
284 <
285 < sub Restrict_start {
286 <        my $self=shift;
287 <        my $name=shift;
288 <        my $hashref=shift;
289 <
290 <        $self->{switch}->checktag( $name, $hashref, 'autoselect');
291 <        if ( $self->{Arch} ) {
292 <        # -- create selection state stack
293 <        push @{$self->{restrictstack}}, $self->_autoselect();
294 <        $self->_autoselect(
295 <                (($$hashref{'autoselect'}=~/true/i)?1:0));
296 <        }
297 < }
298 <
299 < sub Restrict_end {
335 <        my $self=shift;
336 <        my $name=shift;
337 <        
338 <        if ( $self->{Arch} ) {
339 <        if ( $#{$self->{restrictstack}} >= 0 ) {
340 <          $self->_autoselect(pop @{$self->{restrictstack}});
341 <        }
342 <        else {
343 <          $self->{switch}->parseerror("Unmatched </$name>");
344 <        }
345 <        }
346 < }
347 <
348 < sub require_start {
349 <        my $self=shift;
350 <        my $name=shift;
351 <        my $hashref=shift;
352 <        
353 <        $self->{switch}->checktag( $name, $hashref, 'version');
354 <        $self->{switch}->checktag( $name, $hashref, 'name');
355 <        $self->{switch}->checktag( $name, $hashref, 'url');
356 <        
357 <        if ( $self->{reqcontext} == 1 ) {
358 <          $self->{switch}->parseerror(
359 <                "Open new $name context without previous </$name>");
360 <        }
361 <        $self->{reqcontext}=1;
362 <        $$hashref{'name'}=~tr[A-Z][a-z];
363 <        push @{$self->{tools}}, $$hashref{'name'};
364 <        $self->{version}{$$hashref{'name'}}=$$hashref{'version'};
365 <        # -- make sure the full url is taken
366 <        my $urlobj=$self->{switch}->expandurl($$hashref{'url'});
367 <        $self->{url}{$$hashref{'name'}}=$urlobj->url();
368 <
369 <
370 <        # Disable the auto select mechanism. Now, we start with
371 <        # all tools having a flag "UNSELECTED". Then we choose
372 <        # which we wish to select:
373 <        if ( $self->{Arch} )
374 <           {
375 <            $self->{selected}{$$hashref{'name'}}="UNSELECTED";
376 <           }
377 <        # Output the tool name here with the value
378 <        # of its' select flag:
379 <        $self->verbose(">> Tool name: ".$$hashref{'name'}." sel/desel flag value: ".
380 <                       $self->{selected}{$$hashref{'name'}} ." ");
381 <
382 <        $self->{creqtool}=$$hashref{'name'};
383 <        $self->{creqversion}=$$hashref{'version'};
384 <        $self->{reqtext}{$self->{creqtool}}{$self->{creqversion}}="";
385 < }
386 <
387 < sub require_text {
388 <        my $self=shift;
389 <        my $name=shift;
390 <        my $string=shift;
391 <
392 <        chomp $string;
393 <        $self->{reqtext}{$self->{creqtool}}{$self->{creqversion}}=
394 <                $self->{reqtext}{$self->{creqtool}}{$self->{creqversion}}.
395 <                $string;
396 <                
397 < }
398 <
399 < sub require_end {
400 <        my $self=shift;
401 <        my $name=shift;
402 <
403 <        if ( $self->{reqcontext} != 1 ) {
404 <          $self->{switch}->parseerror("No matching tag for </$name>");
405 <        }
406 <        else {
407 <          $self->{reqcontext}=0;
408 <        }
409 < }
274 > sub require_text
275 >   {
276 >   my $self=shift;
277 >   my $name=shift;
278 >   my $string=shift;
279 >  
280 >   chomp $string;
281 >   $self->{reqtext}{$self->{creqtool}}{$self->{creqversion}}=
282 >      $self->{reqtext}{$self->{creqtool}}{$self->{creqversion}}.
283 >      $string;  
284 >   }
285 >
286 > sub require_end
287 >   {
288 >   my $self=shift;
289 >   my $name=shift;
290 >  
291 >   if ( $self->{reqcontext} != 1 )
292 >      {
293 >      $self->{scramdoc}->parseerror("No matching tag for </$name>");
294 >      }
295 >   else
296 >      {
297 >      $self->{reqcontext}=0;
298 >      }
299 >   }
300  
301   sub select_start
302     {
# Line 414 | Line 304 | sub select_start
304     my $name=shift;
305     my $hashref=shift;
306  
307 <   $self->{switch}->checktag( $name, $hashref, 'name');
307 >   $self->{scramdoc}->checktag( $name, $hashref, 'name');
308     $$hashref{'name'}=~tr[A-Z][a-z];
309     if ( $self->{Arch} )
310        {
311        $self->verbose("Selecting ".$$hashref{'name'});
312 <      $self->{selected}{$$hashref{'name'}} = "SELECTED";
313 <      $self->verbose(">> Tool select flag = ".$self->{selected}{$$hashref{'name'}}."\n");
312 >      # Increment counter:
313 >      $self->{selectcounter}++;
314 >      $self->{selected}{$$hashref{'name'}}=$self->{selectcounter};
315        }
316     }
317  
318 < sub deselect_start
318 > sub Arch_Start
319     {
320     my $self=shift;
321     my $name=shift;
322     my $hashref=shift;
323    
324 <   $self->{switch}->checktag( $name, $hashref, 'name');
325 <   $$hashref{'name'}=~tr[A-Z][a-z];
326 <   if ( $self->{Arch} )
324 >   # Check the architecture tag:
325 >   $self->{scramdoc}->checktag($name, $hashref,'name');  
326 >   ( ($self->arch()=~/$$hashref{name}.*/) )? ($self->{Arch}=1)
327 >      : ($self->{Arch}=0);
328 >  
329 >   $self->verbose(($self->{Arch}?"OK":"skipping")." ".$$hashref{name});
330 >   push @{$self->{ARCHBLOCK}}, $self->{Arch};
331 >   push @{$self->{ArchStack}}, $$hashref{'name'};
332 >   }
333 >
334 > sub Arch_End
335 >   {
336 >   my $self=shift;
337 >   my $name=shift;
338 >   pop @{$self->{ARCHBLOCK}};
339 >   $self->{Arch}=$self->{ARCHBLOCK}[$#{$self->{ARCHBLOCK}}];
340 >   }
341 >
342 > sub disttag
343 >   {
344 >   my $self=shift;
345 >   my $name=shift;
346 >   my $hashref=shift;
347 >  
348 >   if ( exists $$hashref{'url'} )
349        {
350 <      $self->verbose("Deselecting ".$$hashref{'name'});
351 <      $self->{selected}{$$hashref{'name'}} = "DESELECTED";
439 <      $self->verbose(">> Tool select flag = ".$self->{selected}{$$hashref{'name'}}."\n");
350 >      $self->{dist}{$self->{creqtool}}{$self->{creqversion}}=
351 >         $$hashref{'url'};
352        }
353     }
354  
355 < sub Arch_Start {
356 <        my $self=shift;
357 <        my $name=shift;
358 <        my $hashref=shift;
359 <
360 <        $self->{switch}->checktag($name, $hashref,'name');
361 <        
362 <        ( ($self->arch()=~/$$hashref{name}.*/) )? ($self->{Arch}=1)
363 <                                                : ($self->{Arch}=0);
364 <        $self->verbose(($self->{Arch}?"OK":"skipping")." ".$$hashref{name});
365 <        push @{$self->{ARCHBLOCK}}, $self->{Arch};
366 <        push @{$self->{ArchStack}}, $$hashref{'name'};
367 < }
368 <
369 < sub Arch_End {
370 <        my $self=shift;
371 <        my $name=shift;
372 <
373 <        pop @{$self->{ARCHBLOCK}};
374 <        $self->{Arch}=$self->{ARCHBLOCK}[$#{$self->{ARCHBLOCK}}];
463 < }
464 <
465 < sub disttag {
466 <        my $self=shift;
467 <        my $name=shift;
468 <        my $hashref=shift;
469 <
470 <        if ( exists $$hashref{'url'} ) {
471 <          $self->{dist}{$self->{creqtool}}{$self->{creqversion}}=
472 <                                                        $$hashref{'url'};
473 <        }
474 < }
355 > sub select()
356 >   {
357 >   my ($xmlparser,$name,%attributes)=@_;
358 > #   print "Selecting ".$attributes{'name'},"\n";
359 >   }
360 >
361 > sub select_()
362 >   {}
363 >
364 > sub AUTOLOAD()
365 >   {
366 >   my ($xmlparser,$name,%attributes)=@_;
367 >   return if $AUTOLOAD =~ /::DESTROY$/;
368 >   my $name=$AUTOLOAD;
369 >   $name =~ s/.*://;
370 >   # Delegate missing function calls to the doc parser class:
371 >   $self->{scramdoc}->$name(%attributes);
372 >   }
373 >
374 > 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines