summaryrefslogtreecommitdiff
path: root/lib/TUWF/XML.pm
AgeCommit message (Collapse)AuthorFilesLines
2023-05-04TUWF::XML: add <menu> HTML5 tagYorhel1-1/+1
2023-01-18Version 1.5v1.5Yorhel1-1/+1
2022-02-15TUWF::XML: Add <summary> html5 tagYorhel1-2/+2
2021-07-09TUWF::XML: Add support for undef and concat attributesYorhel1-2/+12
Undef attribute values exclude the attribute, this is useful in many cases, e.g. input type => 'checkbox', checked => $checked ? '' : undef; Likewise, and in combination with undef attributes, concat attributes are useful for dynamically setting classes: div '+class' => 'box', '+class' => $important ? 'warn' : undef; The '+' prefix is invalid in XML and HTML, so can be safely used for this context. Other prefixes can be added later, too. I had thought of using a '?' prefix for boolean attributes, but using '' and undef kinda works well enough.
2020-01-11TUWF::XML: Add xml_string() function + simple test scriptYorhel1-1/+10
2019-07-06Alright then, have it your way, version 1.4v1.4Yorhel1-1/+1
2019-07-06Version 1.3.1v1.3.1Yorhel1-1/+1
2019-06-17Year + version bump for 1.3v1.3Yorhel1-1/+1
2018-02-18Year + Version bump for 1.2v1.2Yorhel1-1/+1
2018-02-09TUWF::XML: Small performance improvement of xml_escape()Yorhel1-6/+4
I've tried various things to make TUWF::XML faster, but so far this is the only change that actually has some effect. Can shave off about 1% to 3% of the page load time for pages that are heavy on TUWF::XML usage. And '>' totally doesn't need to be escaped.
2018-01-02TUWF::XML: Remove deprecated <menu> tagYorhel1-2/+2
I think I should go over the entire tag list again before the next stable release...
2018-01-02TUWF::XML: Add <main> tagYorhel1-2/+2
Apparently I wasn't using a full html5 reference. Or rather, html5 is still quite a living standard.
2017-12-28TUWF::XML: Fix 'pretty' formatting + disallow end() closing parent tagsYorhel1-4/+9
Html; Head sub { End; # this would previously generate </html>, now it's an error. };
2017-12-28TUWF::XML: Re-add "xml" to export optionsYorhel1-1/+1
Fixes an omission of 35776908b286b3f31a7d14f745f5ec6641c97fd6
2017-12-27TUWF::XML: Support multiple function naming flavorsYorhel1-18/+42
Read: "I've no clue which style is best and everyone has their own opinions, so let's just support everything!" This is a breaking change for the :html5 group, but that group was only added recently and did not yet make it into a stable TUWF release, so there's little actual breakage.
2017-12-16TUWF::XML: Add "mkclass" utility functionYorhel1-1/+9
2017-12-16TUWF::XML: Add HTML5 tagsYorhel1-14/+33
There are many of them, and some may clash with commonly exported functions by other modules. So instead of ucfirst()ing only a few special ones, I decided to be consistend and ucfirst everything. It's slightly uglier, though. :(
2017-12-16TUWF::XML: Add HTML5 doctype and use it by defaultYorhel1-4/+13
This is kind-of a breaking change, but the HTML5 doctype is more compatible than xhtml1-strict. This change is a bit silly when everything else in TUWF::XML is still built for XHTML rather than HTML5, but I'll add some proper HTML5 support in a bit.
2017-12-16TUWF::XML: Add support for a more functional alternative to end()Yorhel1-3/+11
2017-11-26Version 1.1v1.1Yorhel1-1/+1
2015-09-27Version 1.0v1.0Yorhel1-1/+1
2011-02-07Version 0.1 has been released, this repo will now prepresent 0.2Yorhel1-1/+1
2011-02-07Added $VERSION variable and ChangeLog fileYorhel1-0/+1
Makes CPAN users happy
2011-01-16TUWF::XML: More flexible html() functionYorhel1-8/+27
2011-01-16TUWF::XML: Re-ordered tag names and some minor fixesYorhel1-9/+9
2011-01-15TUWF::XML: Print to stdout if no 'write' option was given to new()Yorhel1-0/+1
2011-01-15TUWF::XML: Renamed xml_escape to html_escape and fixed xml_escapeYorhel1-3/+9
xml_escape(), as the name suggests, escapes XML data, which would exclude converting \n to <br /> tags. html_escape() is the same as the previous xml_escape(), as that behaviour *is* quite useful in certain cases. This change also affects all code that assumes tag() values are html_escape()'d. If it turns out that VNDB had a lot of instances where I did make that assumption, I'll probably add a reference-to-scalar-uses-html_escape thing... But it may be nice to reserve the scalarref for other use, like for lit().
2011-01-15TUWF::XML: Added 'default' option to new()Yorhel1-1/+3
To replace the not-really-nice way of assinging to $TUWF::XML::OBJ.
2011-01-11TUWF::XML: Allow optional argument to end() to validate the tag to closeYorhel1-1/+4
end() will croak when the tags do not match, or when there's nothing more to close.
2011-01-11TUWF::XML: Speed up htmlbool lookup and cleanup tag() indirectionYorhel1-14/+5
2011-01-11TUWF::XML: carp or croak on some common errorsYorhel1-3/+12
This should make debugging a lot easier
2011-01-11Added OO support to TUWF::XML and allow it to be used outside of TUWFYorhel1-19/+36
Will write an example for that later on.
2011-01-09TUWF::XML: Use the normal 'import' function of ExporterYorhel1-28/+8
This allows TUWF::XML to be imported from outside of TUWF. (Though it cannot be used yet since it still requires $TUWF::OBJ to be present)
2011-01-09s/YAWF/TUWF/ and removed examples and some oudated docsYorhel1-0/+156
I'll create new examples while making some improvements to the framework.