Commit Graph

13 Commits

Author SHA1 Message Date
ian%hixie.ch
dc80936c17 Made debug() be level 6 instead of level 7. Added various comments. 2001-12-26 19:12:57 +00:00
ian%hixie.ch
988853e179 Removing a bunch of dump(10, ...) calls. It turns out that dump() is actually quite expensive, and calling it 1000+ times just to do nothing isn't that useful. In addition, most of these dump()s were used to debug the core PLIF code which now works pretty well, so they aren't that useful any more. 2001-12-04 18:06:06 +00:00
ian%hixie.ch
ee423a9430 * Created service- and serviceInstance- specific constructors so that a single module can have distinct constructors depending on how it is invoked. These constructors are called serviceInit() and serviceInstanceInit(), and both chain to the existing init() constructor (so no change are required by this).
* Changed FileStrings so that it doesn't have to be updated every time the file string format changes. The format is now one line per piece of metadata, then a blank line, then the string data. If additional metadata is added later then this will automatically support it.
* Renamed the dataSource.strings service to dataSource.strings.customised, and renamed its get() method to getCustomisedString().
* Changed the semantics of dataSource.strings.customised so that it no longer looks for a default string if it can't find a customised one (and thus removed getDefaultString).
* Abstracted the Generic output module even more. It now consists of output.generic (a service instance with its own constructor) and dataSource.strings (a pure service), the latter of which is a wrapper around dataSource.strings.customised and dataSource.strings.defaults.
* Updated Coses to work with the new dataSource.strings insterface.
* Removed the test app DataSource::ConsoleStrings and DataSource::HTTPStrings files, since they were redundant with the default output files.
* Removed all the default strings in the CosesEditor and Login components since they are pretty pointless.
* Factored out the call to dump() in the GenericOutputs module.
* Changed setString in the MySQL string data source so that it will now add a blank string (it used to delete the string if it was blank, but that meant that it was not possible to customise strings away).
* Added a piece of metadata to strings: their version number.
* Updated the customised string data source stubs to mention the version data now stored with all strings
* Added a getAllStringVersions method to the customised strings data source which returns all the string names and their version numbers.
* Made the customised strings data source check the version number of every string in its database during setupInstall to make sure that they are all up to date, version-wise. If any are out of date, the user is notified.
* Added support for the new version column to the MySQL version of the customised string data source.
* Updated the increasingly misnamed CosesEditor to support the versioned strings stuff.
* Factored out some code in the CosesEditor.
* Added version information to all default strings. All default strings are now at version 1.
* Fixed a typo in a FileStrings dump statement.
* Fixed the calls to setProgress in the MySQL user and strings data sources and in the user field factory to use the correct syntax (a parsable dotted string instead of unlocalisable plain English).
* Updated the Generic output module's documentation to match what now happens.
2001-11-22 15:46:42 +00:00
ian%hixie.ch
3ae1b10178 Adding a comment on the use of assert() 2001-11-09 20:09:22 +00:00
ian%hixie.ch
fd84ee0b49 Change default DEBUG level from 9 to 4, which is what it should be in production releases. Added comments explaining debug levels 6 (reserved for personal use) and 8. Added level 10 debug info to the DESTROY method (makes it easier to track down bugs during shutdown). 2001-11-09 16:50:47 +00:00
ian%hixie.ch
a6fc410cbf Adding comments to clearly indicate that no dump()s, warn()s or error()s should have a level lower than 5 unless they are not expected to occur during normal operation. Also changing the default level at which the user is notified of problems from 3 to 1. 2001-11-08 16:47:25 +00:00
ian%hixie.ch
f21e5053e8 Corrected an oversight in the service instance creation code: if a service acts as both a service instance and a normal service, it needs a special constructor to force the creation of the instance, otherwise if the service is created first it will be used again for the instances. 2001-09-19 17:56:15 +00:00
ian%hixie.ch
6ba9034d6e Added the message level number to the debug output to help gauge what level is useful. 2001-09-09 17:55:21 +00:00
ian%hixie.ch
86e3bcd2ae * Improved the helpfulness of the extremely verbose debugging information of PLIF.pm by quoting embedded variables
* Implemented MagicCollectingArray, which acts like MagicPipingArray except that the result is collected into one big array instead of multiple arrayrefs
* Added the relevant getCollecting*List methods to the Controller class
* Added DESTROY methods to the magic array to prevent DESTROY method calls from being propagated
* Made the debug.dumpVars string more robust when the data hash includes one of the three magic characters '(', '.' or ')'
* Implemented sanitation in COSES so that any keys in the data hash containing one of the three magic characters '(', '.' or ')' will have them transliterated to '[', ':' and ']' respectively (sanitation is optional and can be bypassed)
* Changed the API of the generic output module's 'output' method to take the optional $session argument last, thus simplifying the call sites a lot
* Implemented the 'dispatcher.output' service in several classes to return strings that must be support in variants (required for a good UI in the COSES editor)
* Renamed the Login module's strings so that they use the dot-notation separating significant parts
2001-06-04 06:13:22 +00:00
ian%hixie.ch
a47f424255 Added a bit more support for objects (as opposed to services): added a new objectCreate() constructor and an objectInit() method.
Added an optimisation to Controller.pm so that service names will be hashed once accessed. This should make multiple accesses of the same service a lot quicker. To go with this I added some diagnostics code (on exit) and moved the code around a little bit.
Fixed a minor transgression of the coding style guidelines in Magic*Array.pm. :-)
Neatened up the code in Output.pm.
Made it so Session objects assume they have an 'app' property, and so don't need to be passed $app all the time. (Sessions are objects now.)
Added an unimplemented getAddress() method to the Session class.
2001-05-13 18:04:52 +00:00
ian%hixie.ch
b8a735d31d * fixed the methodMissing() method so that it actually is possible to use it to do method dispatching;
* factored out some of the method dispatching code by adding a dispatchMethod() method to the controller;
* turned the Dispatcher class into simply a function on the base Service class and removed Dispatcher.pm;
* made it possible for services to be both services and objects and provide different services depending on which context they were called in (and used this to make the AdminCommands module actually do what it was intended to in the first place, namely, only work for CommandLine access);
* fixed it so if a service is first created by getServiceList the constructed version will actually be cached;
* made output more generic by allowing services to implement arbitrary parts of the output API, used that to make AdminCommands usable without requiring additional code to support it;
* added some documentation;
* added some dump(10) statements to help debugging;
* fixed the string datasource SQL;
* fixed the DBI database so it can handle errors;
* added tableExists API to the DBI database helper.
Thanks to myk, justdave and zach for some ideas.
2001-05-06 06:26:24 +00:00
ian%hixie.ch
1dc1d947ea Implementing (and documenting!) PLIF::debug() as suggested by zach. a=hixie 2001-05-05 18:28:08 +00:00
ian%hixie.ch
0baba2d269 work in progress 2001-05-05 07:12:56 +00:00