summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-01-11 15:33:59 +0100
committerYorhel <git@yorhel.nl>2011-01-11 15:33:59 +0100
commit97aa6b5ace6f768fd6ed0ee19bc0e9cd9a194a4d (patch)
treefebddb92deb9c5dadf44f0724ea282230b1eee8b /examples
parent7c77c086083951b079441682eeda803ff0fe9662 (diff)
TUWF::XML: Allow optional argument to end() to validate the tag to close
end() will croak when the tags do not match, or when there's nothing more to close.
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/xml.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/xml.pl b/examples/xml.pl
index 9431fe9..4f23616 100755
--- a/examples/xml.pl
+++ b/examples/xml.pl
@@ -32,7 +32,7 @@ $h->html();
$h->h1('Page Title');
$h->p('Paragraph');
$h->end();
-$h->end();
+$h->end('html');
# generate an pretty-printed XML document using the functional interface
@@ -42,6 +42,6 @@ xml();
tag('root', attribute => 'value');
tag('tag', 'Contents');
tag('tag', attribute => 'value', 'Contents');
-end();
+end('root');
print "\n";