File: custom_footnotes.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 (28 lines) | stat: -rw-r--r-- 523 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
27
28
#!/usr/bin/perl

use strict;
use warnings;

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

=head1 DESCRIPTION

This script demonstrates how to used a custom footnote for your
links.

In this case all the footnotes will now be of the form

footnote 10 is for http://exo.org.uk/code/

=cut

my $html = get("http://exo.org.uk/");
my $f = HTML::FormatText::WithLinks->new(
    base            =>  'http://exo.org.uk/',
    unique_links    =>  1,
    footnote        =>  'footnote %n is for %l'
);

print $f->parse($html);