diff options
author | Yorhel <git@yorhel.nl> | 2011-01-11 15:33:59 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2011-01-11 15:33:59 +0100 |
commit | 97aa6b5ace6f768fd6ed0ee19bc0e9cd9a194a4d (patch) | |
tree | febddb92deb9c5dadf44f0724ea282230b1eee8b /examples | |
parent | 7c77c086083951b079441682eeda803ff0fe9662 (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-x | examples/xml.pl | 4 |
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"; |