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