Debian Codegraph @

examples/latin

raw ◀ ▶
1 Debian patch touch this file
•1 #!/usr/bin/perl -w
2 =head1 NAME
3
4 latin - just some example code using HTML::Stream::Latin1
5
6 =cut
7
8
9 use HTML::Stream;
10
11 accept_tag HTML::Stream 'BLORF';
12
13 $PLAIN = new HTML::Stream \*STDOUT;
14 $LATIN = new HTML::Stream::Latin1 \*STDOUT;
15
16 sub test {
17 my $HTML = shift;
18 $HTML -> nl
19 -> H2 -> t("From ", ref($HTML), "...") -> _H2
20 -> nl;
21 $HTML -> t(qq{\253Fran\347ois, },
22 qq{a \"right angle\" is 90\260, \277No?\273}) -> nl;
23 $HTML -> P -> t("This example uses \\251: Copyright \251 1997 by me!")
24 -> BR -> t("This example uses ent(): Copyright ")
25 -> e('copy') -> t(" 1997 by me!");
26 $HTML -> P -> BLORF -> t("Hi!") -> _BLORF -> nl;
27 $HTML -> BLORF -> t("Hi!") -> _BLORF;
28 $HTML -> nl(2);
29 }
30 test($PLAIN);
31 test($LATIN);
32