Text::FindLinks

Find and markup URLs in plain text
Download

Text::FindLinks Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Tomá? Znamená?ek
  • Publisher web site:
  • http://search.cpan.org/~zoul/

Text::FindLinks Tags


Text::FindLinks Description

Find and markup URLs in plain text Text::FindLinks is a Perl module to find and markup URLs in plain text.SYNOPSIS use Text::FindLinks 'markup_links'; my $text = "Have you seen www.foo.com yet?"; # Have you seen http://www.foo.com yet? print markup_links(text => $text);FUNCTIONSmarkup_links(text => ..., )Finds all URLs in the given text and replaces them using the given handler. The handler gets passed three arguments: the URL itself, all the text to the left from it and all the text to the right. (The context is passed in case you would like to keep some URLs untouched.) If no handler is given, the default handler will be used that simply creates a link to the URL and skips URLs already turned into links.find_links(text => ...)Returns an array with all the URLs found in given text. Just a simple wrapper around markup_links, see the sources.decorate_link($url, $left, $right)Default URL handler that will be used if you don’t pass your own to the markup_links sub using the handler attribute. It turns an URL into a HTML link and skips URLs that are apparently already links. Not exported. Requirements: · Perl


Text::FindLinks Related Software