Skip to content

Commit

Permalink
Avoid 'Can't use an undefined value as an ARRAY reference message' wh…
Browse files Browse the repository at this point in the history
…en no links are found in the document.
  • Loading branch information
aas committed Sep 5, 1996
1 parent b4823db commit 09552bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/HTML/LinkExtor.pm
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ provided when the L<HTML::LinkExtor> was created.
sub links
{
my $self = shift;
@{$self->{'links'}}
exists($self->{'links'}) ? @{$self->{'links'}} : ();
}

# We override the parse_file() method so that we can clear the links
Expand Down

0 comments on commit 09552bf

Please sign in to comment.