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

Comparing COMP/SCRAM/src/URL/URLhandler.pm (file contents):
Revision 1.4 by williamc, Wed Aug 25 15:43:18 1999 UTC vs.
Revision 1.6 by williamc, Wed Sep 29 08:56:39 1999 UTC

# Line 1 | Line 1
1 < # url handler -> returns the location of the file
2 < #
3 < # Interface
1 > # url handler -> returns the location of thefilu&# Interface
2   # ---------
3   # new() :
4   # new(cachedir)       : A new urlhandler with a defined default cahce directory
5   # get(url)            : download from the specified url to the default cache
6   # get(url,dirlocation)   : download to the specified directory
7   # setbase(type,variablehash) : set the url defaults for a specific url type
8 < #                              arguments are dependent on type
8 > #                              arguments are dependenton type
9   # unsetbase(type)  : deactivate a previously set base
10   # setcache(dir)    : set the default cache location
11   #
# Line 16 | Line 14
14   # can pass a file name for the item to be stored as
15   # if not then stores in a default cache.
16  
17 < package URLhandler;
17 > package URL::URLhandler;
18   require 5.004;
19   use Utilities::AddDir;
20   use URL::URL_base;
# Line 39 | Line 37 | sub init {
37          AddDir::adddir($cache);
38          $self->{cache}=$cache;
39          use URL::URL_cvs;
40 +        use URL::URL_cvsfile;
41          use URL::URL_file;
42          $self->{urlmodules}={
43 <                        'cvs' => 'URL_cvs',
44 <                        'file' => 'URL_file'
43 >                        'cvsfile' => 'URL::URL_cvsfile',
44 >                        'cvs' => 'URL::URL_cvs',
45 >                        'file' => 'URL::URL_file'
46                  };
47          $self->{filebase}="";
48          $self->setbase("file", {}); # Base file as default
# Line 68 | Line 68 | sub get ($@) {
68          if ( ! defined $dirname ) {
69            $dirname=$self->{cache};
70          }
71        print "dirname = $dirname \n";
71          chdir $dirname or carp "Unable to Enter Directory $dirname $!\n";
72          chomp $origurl;
73          # get our version info from the url (after last ??)
# Line 91 | Line 90 | sub get ($@) {
90             else {
91               $rv=
92               eval{${$self->{urlostack}{$type}}[$#{$self->{urlostack}{$type}}]}->
93 <                                get($rest);
93 >                                get($rest, $dirname);
94             }
95          }
96          if ( $rv ne "" ) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines