summaryrefslogtreecommitdiff
path: root/examples
AgeCommit message (Collapse)AuthorFilesLines
2017-12-28TUWF::XML: Fix 'pretty' formatting + disallow end() closing parent tagsYorhel1-0/+1
Html; Head sub { End; # this would previously generate </html>, now it's an error. };
2017-12-27TUWF::XML: Support multiple function naming flavorsYorhel1-4/+4
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-26TUWF::Request: Check for control characters on all client inputYorhel1-19/+11
Seems much safer. I've not tested this patch as well as I'd like, I'll do some more testing later to see if I broke something.
2017-12-16TUWF::XML: Add "mkclass" utility functionYorhel1-2/+2
2017-12-16TUWF::XML: Add HTML5 tagsYorhel1-12/+12
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 support for a more functional alternative to end()Yorhel1-7/+9
2017-12-09Add sexier replacements for TUWF::register()Yorhel1-37/+14
Once again inspired by Dancer2. The main improvements over TUWF::register() are: - Support for other HTTP methods than HEAD/GET/POST - HTTP method filtering in the routing code - Differentiate between literal and regex routes - Mandate 'tuwf->capture()' - Include the leading slash, to make it more explicit that it matches the entire path. I've wanted to make that last change back in 55cbbb319a135dbddfbfdd989bc0cb364edef81d, but couldn't because that would break a lot of code. TUWF::register() still works like it used to, so these additions shouldn't break anything.
2017-12-09Add a default-exported tuwf() DSL-like functionYorhel1-4/+3
Another inspiration from Dancer2. While Dancer2 exports a whole bunch of such functions, TUWF's functionality is already mostly contained in a single object, so a single function will do nicely.
2017-12-09Add $self->capture() method to extract route capturesYorhel1-1/+5
(Inspired by Dancer2's captures())
2017-12-06Add support for running as a standalone web serverYorhel2-3/+4
2017-12-06Add reqJSON and resJSON for simple JSON API supportYorhel1-0/+8
2011-01-15TUWF::XML: Print to stdout if no 'write' option was given to new()Yorhel1-2/+2
2011-01-15TUWF::XML: Added 'default' option to new()Yorhel1-1/+1
To replace the not-really-nice way of assinging to $TUWF::XML::OBJ.
2011-01-15reqGET -> reqGet, reqPOST -> reqPost, and two other minor changesYorhel1-2/+2
2011-01-12TUWF::Request: Implemented own cookie parserYorhel1-0/+6
This removes the dependency on CGI::Cookie::XS. reqCookie() can now also be used without arguments, in which case it will return the list of available cookie names. Also extended examples/MyWebsite/InfoDump.pm to list the cookies.
2011-01-12Added file upload info to examples/MyWebsite/InfoDump.pmYorhel1-1/+21
2011-01-11Added examples/MyWebsite/InfoDump.pmYorhel1-0/+106
More because it allows me to easily test the changes to TUWF::Request than for the sake of more examples, but I bet it can work as an example to some people as well. :-)
2011-01-11TUWF::XML: Allow optional argument to end() to validate the tag to closeYorhel1-2/+2
end() will croak when the tags do not match, or when there's nothing more to close.
2011-01-11Added examples/xml.plYorhel1-0/+47
2011-01-11Added examples/multifile.pl and MyWebsite/ErrorPages.pmYorhel2-0/+106
2011-01-11Added examples/singlefile.plYorhel1-0/+72
Demonstrates how TUWF can be used for small websites.
2011-01-09s/YAWF/TUWF/ and removed examples and some oudated docsYorhel4-218/+0
I'll create new examples while making some improvements to the framework.
2008-10-26Proper 'packaging' + readme + license fileYorhel4-0/+218
I've chosen a MIT license for this project, I'm pretty sure nobody would disagree with that.