60 |
|
my $obj; |
61 |
|
|
62 |
|
$file=$self->{urlhandler}->get($url); |
63 |
< |
if ( $linkfile ne "" ) { |
63 |
> |
if ( ( defined $linkfile) && ( $linkfile ne "" ) ) { |
64 |
|
$filename=$file."/".$linkfile; |
65 |
|
} |
66 |
+ |
else { |
67 |
+ |
$filename=$file; |
68 |
+ |
} |
69 |
|
$obj=$self->{dochandler}->newdoc($filename); |
70 |
|
|
71 |
|
# Now Extend our tree |
100 |
|
return $tn->associate(); |
101 |
|
} |
102 |
|
|
103 |
+ |
sub line { |
104 |
+ |
my $self=shift; |
105 |
+ |
return $self->{switch}->line(); |
106 |
+ |
} |
107 |
+ |
|
108 |
+ |
sub error { |
109 |
+ |
my $self=shift; |
110 |
+ |
my $string=shift; |
111 |
+ |
|
112 |
+ |
die $string."\n"; |
113 |
+ |
|
114 |
+ |
} |
115 |
|
sub parseerror { |
116 |
|
my $self=shift; |
117 |
|
my $string=shift; |
118 |
|
|
119 |
< |
print "Parse Error in $self->{url}, line $self-{switch}->line()\n"; |
119 |
> |
print "Parse Error in $self->{url}, line ". |
120 |
> |
$self->line()."\n"; |
121 |
|
print $string."\n"; |
122 |
|
die; |
123 |
|
} |