"Fossies" - the Fresh Open Source Software Archive

Member "HTML-Stream-1.60/examples/opts" (27 Oct 1998, 546 Bytes) of package /linux/www/old/HTML-Stream-1.60.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/perl -w
    2 
    3 use HTML::Stream; 
    4 
    5 # Setup:
    6 $HTML = new HTML::Stream \*STDOUT;
    7 $href = "/usr/local/foo";
    8 $verse = <<EOF;
    9         I am the very model of a modern major general,
   10         I've information vegetable animal and mineral.
   11 EOF
   12 
   13 # Test:
   14 sub test {
   15     $HTML -> P -> A(HREF=>"$href") 
   16       -> IMG(SRC=>"foo.gif", ALT=>"FOO!") 
   17       -> t("Copyright \251 1997 by me!")
   18       -> _A;
   19     $HTML -> P -> text($verse) -> BR -> BR;
   20 }
   21 
   22 $HTML -> H1 -> t("NORMAL") -> _H1;
   23 &test;
   24 $HTML -> H1 -> t("NO AUTOFORMAT") -> _H1;
   25 $HTML->auto_format(0);
   26 &test;
   27