ian%hixie.ch
|
e376750c1d
|
Escape newlines in keys. Explicitly mention empty arrays and hashes. Quote string values. Support undefined values.
git-svn-id: svn://10.0.0.236/trunk@135864 18797224-902f-48f8-a5cc-f745e15eee43
|
2003-01-05 23:47:15 +00:00 |
|
ian%hixie.ch
|
e6ec1b20e3
|
Oops, forgot to escape the backslashes when I pasted my TemplateToolkit file into Perl.
git-svn-id: svn://10.0.0.236/trunk@135801 18797224-902f-48f8-a5cc-f745e15eee43
|
2003-01-03 00:47:32 +00:00 |
|
ian%hixie.ch
|
7f09c2f1fb
|
Switch to a hopefully much faster debug.dumpVars template
git-svn-id: svn://10.0.0.236/trunk@135800 18797224-902f-48f8-a5cc-f745e15eee43
|
2003-01-03 00:24:27 +00:00 |
|
ian%hixie.ch
|
194002b5b9
|
Three new filters: pad left, pad right, and indent lines, so that the first line can be indented a different amoun.
git-svn-id: svn://10.0.0.236/trunk@135796 18797224-902f-48f8-a5cc-f745e15eee43
|
2003-01-02 22:32:42 +00:00 |
|
ian%hixie.ch
|
a3008e0a68
|
Turns out sprintf() is redundant with the format filter, so removing it.
git-svn-id: svn://10.0.0.236/trunk@135792 18797224-902f-48f8-a5cc-f745e15eee43
|
2003-01-02 21:47:12 +00:00 |
|
ian%hixie.ch
|
ce64a85119
|
Make methodMissing use syntaxError instead of error(). Remove all the user level, error reporting and fatal handlers nonsense. Remove the debug() method. Update error() and assert() to be simply quick shortcuts to raising exceptions, using deep magic to make the stacktraces look good.
git-svn-id: svn://10.0.0.236/trunk@135788 18797224-902f-48f8-a5cc-f745e15eee43
|
2003-01-02 20:39:49 +00:00 |
|
ian%hixie.ch
|
e59ea54e7a
|
Propagate PLIF::Exceptions through TemplateToolkit code without stringifying them.
git-svn-id: svn://10.0.0.236/trunk@135786 18797224-902f-48f8-a5cc-f745e15eee43
|
2003-01-02 20:34:27 +00:00 |
|
ian%hixie.ch
|
77d0568da4
|
Make report also return the exception, so it can be reported and raised at the same time (useful for debugging). Make reraising of exceptions not wipe out the original stacktrace. Clean up stringification: Cope with calls from eval '...' blocks and sub { ... } blocks, also dump the environment, don't stringify object arguments, escape newlines in string arguments.
git-svn-id: svn://10.0.0.236/trunk@135785 18797224-902f-48f8-a5cc-f745e15eee43
|
2003-01-02 20:33:10 +00:00 |
|
ian%hixie.ch
|
823749eae6
|
Add some singulars up at the mulit-year level.
git-svn-id: svn://10.0.0.236/trunk@135745 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-31 23:36:59 +00:00 |
|
ian%hixie.ch
|
a94380c4e3
|
Nicer alignment.
git-svn-id: svn://10.0.0.236/trunk@135744 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-31 23:23:12 +00:00 |
|
ian%hixie.ch
|
a55e66c036
|
Replace Carp.pm with Exception.pm so that we have a consistent interface to exceptions and errors. Also add a syntaxError check in AUTOLOAD to make sure we don't call it when we shouldn't.
git-svn-id: svn://10.0.0.236/trunk@135707 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-30 08:04:29 +00:00 |
|
ian%hixie.ch
|
c73fee76ea
|
Neaten up the arguments display: limit the depth, allow integers to be unquoted as well as floats, crop long strings.
git-svn-id: svn://10.0.0.236/trunk@135706 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-30 08:02:40 +00:00 |
|
ian%hixie.ch
|
8265b3ec37
|
Remove bogus argument, and add error checking code to catch similar errors in future
git-svn-id: svn://10.0.0.236/trunk@135704 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-30 07:52:19 +00:00 |
|
ian%hixie.ch
|
da7a28fc8e
|
Export the syntaxError function, which reports a syntax error where the caller was invoked.
git-svn-id: svn://10.0.0.236/trunk@135698 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-30 07:30:43 +00:00 |
|
ian%hixie.ch
|
d75258c737
|
Reduce the number of sites that call 'caller'. Let's hope that this doesn't get optimised too much, or else the line numbers will start getting increasingly inaccurate...
git-svn-id: svn://10.0.0.236/trunk@135697 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-30 07:28:45 +00:00 |
|
ian%hixie.ch
|
20964a11b5
|
Add support for reporting Exceptions as warnings, for parity with, and so that PLIF can transition from, Carp.pm
git-svn-id: svn://10.0.0.236/trunk@135696 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-30 07:06:34 +00:00 |
|
ian%hixie.ch
|
91fd7737aa
|
Remove debugging code that accidentally got checked in.
git-svn-id: svn://10.0.0.236/trunk@135694 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-30 06:43:27 +00:00 |
|
ian%hixie.ch
|
40245c1eb3
|
Clean up the stack trace code: make stacktrace smarter about where the exception should be reported from, make it know about the arguments to the functions, make the stringifier know about try{} blocks
git-svn-id: svn://10.0.0.236/trunk@135693 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-30 06:40:05 +00:00 |
|
ian%hixie.ch
|
73054a5523
|
Additional comments explaining what might happen in cases of key clashes.
git-svn-id: svn://10.0.0.236/trunk@135686 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-29 21:02:59 +00:00 |
|
ian%hixie.ch
|
127d2d9bdf
|
Minor grammatical fix.
git-svn-id: svn://10.0.0.236/trunk@135685 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-29 21:02:22 +00:00 |
|
ian%hixie.ch
|
3e837c2278
|
Fixing the support for the 'attempt()' method on databases, which was broken while fixing the fallout from the Exception stuff.
git-svn-id: svn://10.0.0.236/trunk@135680 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-29 03:56:00 +00:00 |
|
ian%hixie.ch
|
99315a2625
|
Allow catch...with statements to not be followed by anything. Also add a little debug code.
git-svn-id: svn://10.0.0.236/trunk@135673 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-28 18:24:27 +00:00 |
|
ian%hixie.ch
|
f7054d1562
|
Unify the statement execution methods so that we can have consistent exception raising
git-svn-id: svn://10.0.0.236/trunk@135672 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-28 18:23:24 +00:00 |
|
ian%hixie.ch
|
7218c6231f
|
Add rudimentary stacktrace support to the Exception library
git-svn-id: svn://10.0.0.236/trunk@135665 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-28 03:31:59 +00:00 |
|
ian%hixie.ch
|
bbe16d6189
|
Propagate the results out of the 'row' function correctly again -- the wantarray context isn't maintained inside a try block, unfortunately
git-svn-id: svn://10.0.0.236/trunk@135663 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-28 03:27:23 +00:00 |
|
ian%hixie.ch
|
d8f35b1b4a
|
Update PLIF to take advantage of the new PLIF exception handling library
git-svn-id: svn://10.0.0.236/trunk@135638 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-26 04:37:22 +00:00 |
|
ian%hixie.ch
|
5853a497f0
|
Fix the context-sensitive code to actually work. Fix the result returning code to actually work too. Make wrapped exceptions include actual filename and line info.
git-svn-id: svn://10.0.0.236/trunk@135637 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-26 04:35:17 +00:00 |
|
ian%hixie.ch
|
4a90331d0a
|
Rename 'handle' to 'catch' and 'unhandled' to 'fallthrough', so that we get fewer clashes with existing code.
git-svn-id: svn://10.0.0.236/trunk@135636 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-26 03:33:22 +00:00 |
|
ian%hixie.ch
|
c93aab4f23
|
Remove trailing spaces, add a missing parenthesis, add 'otherwise' to the list of exported keywords, support 'ne' operator on exception objects.
git-svn-id: svn://10.0.0.236/trunk@135635 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-26 03:11:34 +00:00 |
|
ian%hixie.ch
|
a1b781fce9
|
Add support for an "otherwise" block which is called if no exception is triggered. Also, refactor the code to shorten it a bit.
git-svn-id: svn://10.0.0.236/trunk@135634 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-26 02:07:19 +00:00 |
|
ian%hixie.ch
|
d7aee7f938
|
Handle exceptions raised inside exception blocks by reraising them after the finally block. This code is going to need some refactoring at some point...
git-svn-id: svn://10.0.0.236/trunk@135632 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-25 16:48:54 +00:00 |
|
ian%hixie.ch
|
f9d8540251
|
If the exception isn't handled, it should be re-raised.
git-svn-id: svn://10.0.0.236/trunk@135631 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-25 16:20:03 +00:00 |
|
ian%hixie.ch
|
b2500534f2
|
Minor comment fixup
git-svn-id: svn://10.0.0.236/trunk@135630 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-25 14:14:11 +00:00 |
|
ian%hixie.ch
|
1f99610ede
|
Change the semantics of |try| to return the result of the try block when no exception is raised.
git-svn-id: svn://10.0.0.236/trunk@135629 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-25 12:37:38 +00:00 |
|
ian%hixie.ch
|
881e6f7054
|
Add basic stringification to exceptions
git-svn-id: svn://10.0.0.236/trunk@135628 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-25 12:20:34 +00:00 |
|
ian%hixie.ch
|
125131ad8a
|
A standalone class to provide thorough Exception handling in Perl. This, like the Magic* classes, could easily be used separate from PLIF.
git-svn-id: svn://10.0.0.236/trunk@135625 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-25 00:39:40 +00:00 |
|
ian%hixie.ch
|
85dc00f7b1
|
Remove the annoying 'tried to log in but was already logged in' warning that would be hit each time someone clicked a link to, or used a bookmark to, a login page.
git-svn-id: svn://10.0.0.236/trunk@135590 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-23 11:49:01 +00:00 |
|
ian%hixie.ch
|
2cee3c9a12
|
Mark GET and HEAD requests as idempotent. Commands still have to explicitly support this, of course.
git-svn-id: svn://10.0.0.236/trunk@135589 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-23 11:47:20 +00:00 |
|
ian%hixie.ch
|
10d67334f2
|
Add support for cookies using the new getSessionData() API.
git-svn-id: svn://10.0.0.236/trunk@135588 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-23 11:46:30 +00:00 |
|
ian%hixie.ch
|
c0c07ec40c
|
Minor fixups on the regexps. Add support for '--' to signal the end of the arguments (although at the moment it only cancels the previous argument rather than indicating the end of any flag arguments). Change the --batch-force-defaults to be the default --batch mode, and make the old --batch mode be called --batch-no-defaults. This could change again later.
git-svn-id: svn://10.0.0.236/trunk@135587 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-23 11:45:37 +00:00 |
|
ian%hixie.ch
|
cebe0dd11b
|
since the default getMetaData() does the same now, removing this redundant implementation
git-svn-id: svn://10.0.0.236/trunk@135586 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-23 11:42:57 +00:00 |
|
ian%hixie.ch
|
2ed118ae9c
|
Change getMetaData() to default to undef rather than requiring that it be implemented in descendants. Introduce getSessionData() for things like cookies. Introduce idempotent() so that protocols that can guarentee side-effect-free requests have a way of signalling their wishes.
git-svn-id: svn://10.0.0.236/trunk@135585 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-23 11:41:53 +00:00 |
|
ian%hixie.ch
|
fdefe32495
|
user prefs should be a POST not a GET.
git-svn-id: svn://10.0.0.236/trunk@135584 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-23 11:39:43 +00:00 |
|
ian%hixie.ch
|
4fef49a101
|
Have to escape the error message, otherwise it gets treated as HTML, oops\!
git-svn-id: svn://10.0.0.236/trunk@135583 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-23 11:38:50 +00:00 |
|
ian%hixie.ch
|
ee041f841f
|
Minor typo fix in debug code
git-svn-id: svn://10.0.0.236/trunk@135582 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-23 11:37:42 +00:00 |
|
ian%hixie.ch
|
3c073dde8a
|
Change the Controller to inherit from PLIF::Service, so that we can reuse the 'dispatch' method from that class in Program.pm. Change the defaulting of the application name to be handled by a default name() implementation in Programepm rather than setting it in Controller.pm. Added a comment next to dispatchMethod() to clarify its role.
git-svn-id: svn://10.0.0.236/trunk@135581 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-23 11:35:06 +00:00 |
|
ian%hixie.ch
|
428a3482b2
|
Round correctly. This makes the '1 hour' and other singular forms work correctly.
git-svn-id: svn://10.0.0.236/trunk@135575 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-22 22:21:59 +00:00 |
|
ian%hixie.ch
|
37d6739681
|
Add a 'sprintf' operator to scalars
git-svn-id: svn://10.0.0.236/trunk@135574 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-22 22:21:07 +00:00 |
|
ian%hixie.ch
|
2c7eed2733
|
Add a convenient 'time delta in seconds' to 'brief duration description in english' convertor. Escaped the values in an HTML output string.
git-svn-id: svn://10.0.0.236/trunk@135570 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-12-22 15:44:50 +00:00 |
|
ian%hixie.ch
|
f17db356a9
|
Fix it so HEAD requests actually work rather than Apache aborting due to 'incomplete headers'.
git-svn-id: svn://10.0.0.236/trunk@134090 18797224-902f-48f8-a5cc-f745e15eee43
|
2002-11-19 06:54:35 +00:00 |
|