1 |
williamc |
1.1 |
#
|
2 |
|
|
# standard url interface - dummy implementation
|
3 |
|
|
#
|
4 |
|
|
# Interface
|
5 |
|
|
# ---------
|
6 |
|
|
# new() : new object - calls init ->override init
|
7 |
|
|
# get(url, destination) : Override
|
8 |
williamc |
1.3 |
# init() : Override
|
9 |
williamc |
1.1 |
|
10 |
williamc |
1.2 |
package URL::URL_base;
|
11 |
williamc |
1.3 |
use URL::URLclass;
|
12 |
williamc |
1.1 |
require 5.001;
|
13 |
|
|
|
14 |
|
|
sub new {
|
15 |
|
|
my $class=shift;
|
16 |
|
|
$self={};
|
17 |
|
|
bless $self, $class;
|
18 |
|
|
$self->init();
|
19 |
|
|
return $self;
|
20 |
|
|
}
|
21 |
|
|
|
22 |
williamc |
1.4 |
sub error {
|
23 |
|
|
my $self=shift;
|
24 |
|
|
|
25 |
|
|
if ( @_ ) {
|
26 |
|
|
$self->{errorstring}=$self->{errorstring}."\n".shift;
|
27 |
|
|
}
|
28 |
|
|
return (defined $self->{errorstring})?$self->{errorstring}:undef;
|
29 |
|
|
}
|
30 |
|
|
|
31 |
williamc |
1.1 |
# ----- Dummy interface routines
|
32 |
|
|
sub init {
|
33 |
|
|
# Dummy - override as reqd
|
34 |
|
|
}
|