diff options
author | Yorhel <git@yorhel.nl> | 2011-01-15 18:19:03 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2011-01-15 18:19:03 +0100 |
commit | 2b876fc39dbbeccd8552089390b64633221f6217 (patch) | |
tree | 76e02dfc0ade093b902c497feb2bd5efd1ac0221 /examples | |
parent | 8aef8709a053c887d63c08f455acbf701f7ec71f (diff) |
TUWF::XML: Print to stdout if no 'write' option was given to new()
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/xml.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/xml.pl b/examples/xml.pl index 70e78eb..31d3e4f 100755 --- a/examples/xml.pl +++ b/examples/xml.pl @@ -23,7 +23,7 @@ printf "xml_escape: %s\n\n", xml_escape '<br />'; # generate a simple html page using the OO interface print "HTML page:\n"; -my $h = TUWF::XML->new(write => sub { print @_ }); +my $h = TUWF::XML->new(); $h->html(); $h->head(); $h->title('Page Title'); @@ -37,7 +37,7 @@ $h->end('html'); # generate an pretty-printed XML document using the functional interface print "\n\nXML document:\n"; -TUWF::XML->new(write => sub { print @_ }, pretty => 2, default => 1); +TUWF::XML->new(pretty => 2, default => 1); xml(); tag('root', attribute => 'value'); tag('tag', 'Contents'); |