11 |
|
# new(URLcache[,DocVersionTag] : A new SimpleURLDoc object. You can also |
12 |
|
# specify an alternative doc version tag |
13 |
|
# addbasetags(parse) : Add Base Tags to the given parse |
14 |
< |
# urlget(urlstring[,location]) : get the given url. Returns (url, filename) |
14 |
> |
# urlget(urlstring[,location]) : get the given url - using the cache. |
15 |
> |
# Returns (url, filename) |
16 |
> |
# urldownload(urlstring[,location]) : get the given url ignoring any cached |
17 |
> |
# version. Returns (url, filename) |
18 |
|
# expandurl(urlstring) : return a URLclass object of the given url expanded |
19 |
|
# according to the base settings |
20 |
|
# cache([cache]) : get/set the current URL cache |
60 |
|
return $self->{urlhandler}->expandurl($urlstring); |
61 |
|
} |
62 |
|
|
63 |
+ |
sub urldownload { |
64 |
+ |
my $self=shift; |
65 |
+ |
my $urlstring=shift; |
66 |
+ |
|
67 |
+ |
($fullurl,$filename)=$self->{urlhandler}->download($urlstring, @_); |
68 |
+ |
if ( ( ! defined $filename ) || ( $filename eq "" ) ) { |
69 |
+ |
$self->{switch}->parseerror("Failed to get $fullurl"); |
70 |
+ |
} |
71 |
+ |
return ($fullurl,$filename); |
72 |
+ |
} |
73 |
+ |
|
74 |
|
sub urlget { |
75 |
|
my $self=shift; |
76 |
|
my $urlstring=shift; |