1 | #! perl |
1 | #! perl |
2 | |
2 | |
3 | # same url as used in "selection" |
3 | # same url as used in "selection" |
4 | my $url = |
4 | my $url = |
5 | qr{( |
5 | qr{( |
6 | (?:https?|ftp|news|mailto|file)://[ab-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27(),~]+ |
6 | (?:https?://|ftp://|news://|mailto:|file://)[ab-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27(),~#]+ |
7 | [ab-zA-Z0-9\-\@;\/?:&=%\$_+!*\x27()~] # exclude some trailing characters (heuristic) |
7 | [ab-zA-Z0-9\-\@;\/?:&=%\$_+!*\x27()~] # exclude some trailing characters (heuristic) |
8 | )}x; |
8 | )}x; |
9 | |
9 | |
10 | sub on_start { |
10 | sub on_start { |
11 | my ($self) = @_; |
11 | my ($self) = @_; |