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 |
# init() : Override
|
9 |
|
10 |
package URL::URL_base;
|
11 |
use URL::URLclass;
|
12 |
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 |
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 |
# ----- Dummy interface routines
|
32 |
sub init {
|
33 |
# Dummy - override as reqd
|
34 |
}
|