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

Comparing COMP/SCRAM/src/ActiveDoc/SimpleURLDoc.pm (file contents):
Revision 1.1.2.5 by williamc, Fri Aug 11 10:26:41 2000 UTC vs.
Revision 1.1.2.6 by williamc, Mon Aug 21 15:19:50 2000 UTC

# Line 25 | Line 25 | package ActiveDoc::SimpleURLDoc;
25   use ActiveDoc::SimpleDoc;
26   use URL::URLhandler;
27   require 5.001;
28 + @ISA=qw(ActiveDoc::SimpleDoc);
29  
30   sub new {
31          my $class=shift;
32          my $self={};
33          bless $self, $class;
34          $self->cache(shift);
35 <        $self->{switch}=ActiveDoc::SimpleDoc->new(@_);
35 >        $self->_initdoc("doc",@_);
36 >        #$self->{switch}=ActiveDoc::SimpleDoc->new(@_);
37          return $self;
38   }
39  
# Line 39 | Line 41 | sub addbasetags {
41          my $self=shift;
42          my $parse=shift;
43  
44 <        $self->{switch}->addtag($parse,"base", \&Base_start, $self,
44 >        $self->addtag($parse,"base", \&Base_start, $self,
45                                       "", $self,
46                                       \&Base_end,$self);
47   }
# Line 66 | Line 68 | sub urldownload {
68  
69          ($fullurl,$filename)=$self->{urlhandler}->download($urlstring, @_);
70          if ( ( ! defined $filename ) || ( $filename eq "" ) ) {
71 <          $self->{switch}->parseerror("Failed to get $fullurl");
71 >          $self->parseerror("Failed to get $fullurl");
72          }
73          return ($fullurl,$filename);
74   }
# Line 77 | Line 79 | sub urlget {
79  
80          ($fullurl,$filename)=$self->{urlhandler}->get($urlstring, @_);
81          if ( ( ! defined $filename ) || ( $filename eq "" ) ) {
82 <          $self->{switch}->parseerror("Failed to get $fullurl");
82 >          $self->parseerror("Failed to get $fullurl");
83          }
84          return ($fullurl,$filename);
85   }
86  
87 < sub AUTOLOAD {
88 <        my $self=shift;
89 <
87 > #sub AUTOLOAD {
88 > #       my $self=shift;
89 > #
90          # dont propogate destroy methods
91 <        return if $AUTOLOAD=~/::DESTROY/;
91 > #       return if $AUTOLOAD=~/::DESTROY/;
92  
93          # remove this package name
94 <        ($name=$AUTOLOAD)=~s/ActiveDoc::SimpleURLDoc:://;
94 > #       ($name=$AUTOLOAD)=~s/ActiveDoc::SimpleURLDoc:://;
95  
96          # pass the message to SimpleDoc
97 <        $self->{switch}->$name(@_);
98 < }
97 > #       $self->{switch}->$name(@_);
98 > #}
99  
100   # ------------------------ Support Routines ---------------------------
101  
# Line 104 | Line 106 | sub Base_start {
106          my $name=shift;
107          my $hashref=shift;
108  
109 <        $self->{switch}->checktag($name, $hashref, "url");
109 >        $self->checktag($name, $hashref, "url");
110          my $url=$self->{urlhandler}->setbase($$hashref{'url'});
111          push @{$self->{basestack}}, $url->type();
112   }
# Line 116 | Line 118 | sub Base_end {
118            $self->{urlhandler}->unsetbase($type);
119          }
120          else {
121 <          $self->{switch}->parseerror("Unmatched <$name>");
121 >          $self->parseerror("Unmatched <$name>");
122          }
123   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines