File: opts

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 (27 lines) | stat: -rw-r--r-- 546 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/perl -w

use HTML::Stream; 

# Setup:
$HTML = new HTML::Stream \*STDOUT;
$href = "/usr/local/foo";
$verse = <<EOF;
        I am the very model of a modern major general,
        I've information vegetable animal and mineral.
EOF

# Test:
sub test {
    $HTML -> P -> A(HREF=>"$href") 
	  -> IMG(SRC=>"foo.gif", ALT=>"FOO!") 
	  -> t("Copyright \251 1997 by me!")
	  -> _A;
    $HTML -> P -> text($verse) -> BR -> BR;
}

$HTML -> H1 -> t("NORMAL") -> _H1;
&test;
$HTML -> H1 -> t("NO AUTOFORMAT") -> _H1;
$HTML->auto_format(0);
&test;