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