File: latin

package info (click to toggle)
libhtml-stream-perl 1.60-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 388 kB
  • sloc: perl: 666; makefile: 2
file content (32 lines) | stat: -rwxr-xr-x 767 bytes parent folder | download | duplicates (3)
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
29
30
31
32
#!/usr/bin/perl -w
=head1 NAME

latin - just some example code using HTML::Stream::Latin1

=cut


use HTML::Stream;

accept_tag HTML::Stream 'BLORF';

$PLAIN = new HTML::Stream \*STDOUT;
$LATIN = new HTML::Stream::Latin1 \*STDOUT;

sub test {
    my $HTML = shift;
    $HTML -> nl 
	  -> H2 -> t("From ", ref($HTML), "...") -> _H2
	  -> nl;
    $HTML -> t(qq{\253Fran\347ois, },
	       qq{a \"right angle\" is 90\260, \277No?\273}) -> nl;
    $HTML -> P  -> t("This example uses \\251: Copyright \251 1997 by me!")
          -> BR -> t("This example uses ent(): Copyright ") 
	        -> e('copy') -> t(" 1997 by me!");
    $HTML -> P -> BLORF -> t("Hi!") -> _BLORF -> nl;
    $HTML -> BLORF -> t("Hi!") -> _BLORF;
    $HTML -> nl(2);
}
test($PLAIN);
test($LATIN);