File: basic_usage.pl

package info (click to toggle)
libhtml-formattext-withlinks-perl 0.15-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 192 kB
  • sloc: perl: 246; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 537 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/perl

use strict;
use warnings;

use LWP::Simple;
use HTML::FormatText::WithLinks;

=head1 DESCRIPTION

This script shows the basic usage of the module. 

The two options used are the base one to make sure that any relative links
in the page are turned into absolute links and unique_links which only
generates one footnote per link.

=cut

my $html = get("http://exo.org.uk/");
my $f = HTML::FormatText::WithLinks->new(
    base            =>  "http://exo.org.uk/",
    unique_links    =>  1    
);

print $f->parse($html);