"Fossies" - the Fresh Open Source Software Archive

Member "HTML-Stream-1.60/examples/latin" (17 Aug 2001, 748 Bytes) of package /linux/www/old/HTML-Stream-1.60.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code 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