TWiki Source Code Packages![]() pod , so it always matches the running code
On this page:
[[CGISessionDotPm][]]This package doesn't smell[[CGISessionDriverDBIDotPm][]]This package doesn't smell[[CGISessionDriverDb_fileDotPm][]]This package doesn't smell[[CGISessionDriverDotPm][]]This package doesn't smell[[CGISessionDriverFileDotPm][]]This package doesn't smell[[CGISessionDriverMysqlDotPm][]]This package doesn't smell[[CGISessionDriverPostgresqlDotPm][]]This package doesn't smell[[CGISessionDriverSqliteDotPm][]]This package doesn't smell[[CGISessionErrorHandlerDotPm][]]This package doesn't smell[[CGISessionIDIncrDotPm][]]This package doesn't smell[[CGISessionIDMd5DotPm][]]This package doesn't smell[[CGISessionSerializeDefaultDotPm][]]This package doesn't smell[[CGISessionSerializeFreezethawDotPm][]]This package doesn't smell[[CGISessionSerializeJsonDotPm][]]This package doesn't smell[[CGISessionSerializeStorableDotPm][]]This package doesn't smell[[CGISessionSerializeYamlDotPm][]]This package doesn't smell[[CGISessionTutorialDotPm][]]This package doesn't smell[[MonitorDotPm][]]This package doesn't smellTWiki::AccessControlExceptionException used raise an access control violation. This exception has the following fields:
TWiki::AccessA singleton object of this class manages the access control database. This package doesn't smellTWiki::AggregateIteratorcombine multiple iterators This package doesn't smellTWiki::AttachA singleton object of this class is used to deal with attachments to topics. This package doesn't smellTWiki::AttrsClass of attribute sets, designed for parsing and storing attribute values from a TWiki tag e.g.%TAG{"joe" fred="bad" joe="mad"}%
An attribute set is a hash containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the hash.
Attributes declared later in the string will override those of the same
name defined earlier. The one exception to this is the _DEFAULT key, where
the first instance is always taken.
As well as the default TWiki syntax (parameter values double-quoted)
this class also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values.
The extended syntax has to be enabled by passing the $friendly parameter
to new .
This package doesn't smell
TWiki::CompatibilitySupport for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed. This package has smell factor of 2TWiki::Configure::LoadPurposeThis module consists of just a single subroutinereadConfig . It allows to
safely modify configuration variables for one single run without affecting
normal TWiki operation.
This package doesn't smell
[[TWikiConfigureUIsEXTENDDotPm][]]This package has smell factor of 2TWikiTWiki operates by creating a singleton object (known as the Session object) that acts as a point of reference for all the different modules in the system. This package is the class for this singleton, and also contains the vast bulk of the basic constants and the per- site configuration mechanisms. Global variables are avoided wherever possible to avoid problems with CGI accelerators such as mod_perl.Public Data members
| ||||||||
Changed: | ||||||||
< < | This package has smell factor of 36 | |||||||
> > | This package has smell factor of 38 | |||||||
[[TWikiEngineDotPm][]]This package has smell factor of 1TWiki::EngineExceptionException used to raise an engine related error. This exception has the following fields:
TWiki::FormObject representing a single form definition. Form definitions are mainly used to control rendering of a form for editing, though there is some application login there that handles transferring values between edits and saves. A form definition consists of a TWiki::Form object, which has a list of field definitions. Each field definition is an object of a type derived from TWiki::Form::FieldDefinition. These objects are responsible for the actual syntax and semantics of the field type. Form definitions are parsed from TWiki tables, and the types are mapped by name to a class declared in TWiki::Form::* - for example, thetext type is mapped
to TWiki::Form::Text and the checkbox type to TWiki::Form::Checkbox .
The TWiki::Form::FieldDefinition class declares default behaviours for
types that accept a single value in their definitions. The
TWiki::Form::ListFieldDefinition extends this for types that have lists
of possible values.
This package has smell factor of 4
TWiki::Form::FieldDefinitionBase class of all field definition classes. Type-specific classes are derived from this class to define specific per-type behaviours. This class also provides default behaviours for when a specific type cannot be loaded. This package doesn't smellTWiki::Form::ListFieldDefinitionForm field definitions that accept lists of values in the field definition. This is different to being multi-valued, which means the field type can store multiple values. This package has smell factor of 1[[TWikiFormSelectDotPm][]]This package doesn't smellTWiki::Func<-- STARTINCLUDE required for huge TWikiDocumentation topic -->Official list of stable TWiki functions for Plugin developers This module defines official functions that TWiki plugins can use to interact with the TWiki engine and content. Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template plugin and documentation on how to write a plugin. Plugins should only use functions published in this module. If you use functions in other TWiki libraries you might create a security hole and you will probably need to change your plugin when you upgrade TWiki. Deprecated functions will still work in older code, though they should not be called in new plugins and should be replaced in older plugins as soon as possible. The version of the TWiki::Func module is defined by the VERSION number of the TWiki::Plugins module, currently 6.10. This can be shown by the %PLUGINVERSION% TWiki variable, and accessed in code using
$TWiki::Plugins::VERSION . The 'Since' field in the function
documentation refers to $TWiki::Plugins::VERSION .
Notes on use of $TWiki::Plugins::VERSION (from 1.2 forwards):
TWiki::I18NSupport for strings translation and language detection. This package has smell factor of 2TWiki::I18N::ExtractSupport translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon). This package has smell factor of 1TWiki::If::NodeNode class for the result of an If statement parse This package doesn't smellTWiki::If::OP_iswebThis package doesn't smellTWiki::If::ParserSupport for the conditions in %IF{} statements. This package doesn't smellTWiki::Infix::ErrorClass of errors used with TWiki::Infix::Parser This package doesn't smellTWiki::Infix::NodeBase class for node types generated by Infix::Parser. You don't have to use it, but it may be useful. This package doesn't smellTWiki::Infix::ParserA simple stack-based parser that parses infix expressions with nonary, unary and binary operators specified using an operator table. Escapes are supported in strings, using backslash. This package doesn't smellTWiki::LineIteratorIterator over the lines in a file This package doesn't smellTWiki::ListIteratorIterator over a list This package doesn't smellTWiki::LoginManager::ApacheLoginThis is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g.,viewauth -> view , editauth -> edit , and so on.
See also TWikiUserAuthentication.
Subclass of TWiki::LoginManager; see that class for documentation of the
methods of this class.
This package has smell factor of 1
TWiki::LoginManagerThe package is also a Factory for login managers and also the base class for all login managers. On it's own, an object of this class is used when you specify 'none' in the security setup section of configure. When it is used, logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class. If you are building a new login manager, then you should write a new subclass of this class, implementing the methods marked as VIRTUAL. There are already examples in thelib/TWiki/LoginManager directory.
The class has extensive tracing, which is enabled by
$TWiki::cfg{Trace}{LoginManager.pm}. The tracing is done in such a way as to
let the perl optimiser optimise out the trace function as a no-op if tracing
is disabled.
Here's an overview of how it works:
Early in TWiki::new, the login manager is created. The creation of the login
manager does two things:
ObjectData =twikiThe TWiki object this login manager is attached to. This package has smell factor of 8[[TWikiLoginManagerSessionDotPm][]]This package doesn't smellTWiki::LoginManager::TemplateLoginThis is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. Subclass of TWiki::LoginManager; see that class for documentation of the methods of this class. This package has smell factor of 2TWiki::MergeSupport for merging strings This package has smell factor of 1TWiki::MetaAll TWiki topics have data (text) and meta-data (information about the topic). Meta-data includes information such as file attachments, form fields, topic parentage etc. When TWiki loads a topic from the store, it represents the meta-data in the topic using an object of this class. A meta-data object is a hash of different types of meta-data (keyed on the type, such as 'FIELD' and 'TOPICINFO'). Each entry in the hash is an array, where each entry in the array contains another hash of the key=value pairs, corresponding to a single meta-datum. If there may be multiple entries of the same top-level type (i.e. for FIELD and FILEATTACHMENT) then the array has multiple entries. These types are referred to as "keyed" types. The array entries are keyed with the attribute 'name' which must be in each entry in the array. For unkeyed types, the array has only one entry. Pictorially,
TWiki::NetObject that brokers access to network resources. This package has smell factor of 3TWiki::Net::HTTPResponseFakeup of HTTP::Response for use when LWP is not available. Only implements a small subset of the HTTP::Response methods:
TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires
the name of an oops template file from the templates directory.
This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
Plugins may throw TWiki::OopsException. For example:
use Error; ... throw TWiki::OopsException( 'bathplugin', def => 'toestuck', web => $web, topic => $topic, params => [ 'bigtoe', 'hot tap' ] ); This package doesn't smell ---++ [[TWikiPluginDotPm][]] This package has smell factor of *2* ---++ [[TWikiPluginsDotPm][TWiki::Plugins]] This module defines the singleton object that handles Plugins loading, initialization and execution. This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins. This package doesn't smell ---++ [[TWikiPluralsDotPm][TWiki::Plurals]] Handle conversion of plural topic names to singular form. This package doesn't smell ---++ [[TWikiPrefsDotPm][TWiki::Prefs]] The Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these. Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier. The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!) This package doesn't smell ---++ [[TWikiPrefsParserDotPm][TWiki::Prefs::Parser]] This Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics. This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in. This package has smell factor of *1* ---++ [[TWikiPrefsPrefsCacheDotPm][TWiki::Prefs::PrefsCache]] The PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values: * {locals} Contains all locals at this level. Locals are values that only apply when the current topic is the topic where the local is defined. The variable names are decorated with the locality where they apply. * {values} contains all sets, locals, and all values inherited from the parent level As each cache level is built, the values are copied down from the parent cache level. This sounds monstrously inefficient, but in fact perl does this a lot better than doing a multi-level lookup when a value is referenced. This is especially important when many prefs lookups may be done in a session, for example when searching. This package doesn't smell ---++ [[TWikiQueryHoistREsDotPm][TWiki::Query::HoistREs]] Static functions to extract regular expressions from queries. The REs can be used in caching stores that use the TWiki standard inline meta-data representation to pre-filter topic lists for more efficient query matching. See =Store/RcsFile.pm= for an example of usage. This package doesn't smell ---++ [[TWikiQueryNodeDotPm][TWiki::Query]] A Query object is a representation of a query over the TWiki database. Fields are given by name, and values by strings or numbers. Strings should always be surrounded by 'single-quotes'. Numbers can be signed integers or decimals. Single quotes in values may be escaped using backslash (\). See TWiki.QuerySearch for details of the query language. At the time of writing only a subset of the entire query language is supported, for use in searching. A query object implements the =evaluate= method as its general contract with the rest of the world. This method does a "hard work" evaluation of the parser tree. Of course, smarter Store implementations should be able to do it better.... This package has smell factor of *2* ---++ [[TWikiQueryParserDotPm][TWiki::Query::Parser]] Parser for queries This package doesn't smell ---++ [[TWikiRenderDotPm][TWiki::Render]] This module provides most of the actual HTML rendering code in TWiki. This package has smell factor of *22* ---++ [[TWikiRequestDotPm][]] This package has smell factor of *1* ---++ [[TWikiResponseDotPm][]] This package doesn't smell ---++ [[TWikiSandboxDotPm][TWiki::Sandbox]] This object provides an interface to the outside world. All calls to system functions, or handling of file names, should be brokered by this object. NOTE: TWiki creates a singleton sandbox that is *shared* by all TWiki runs under a single mod_perl instance. If any TWiki run modifies the sandbox, that modification will carry over in to subsequent runs. Be very, very careful! This package has smell factor of *4* ---++ [[TWikiSearchDotPm][TWiki::Search]] This module implements all the search functionality. This package has smell factor of *13* ---++ [[TWikiStoreDotPm][TWiki::Store]] This module hosts the generic storage backend. This module provides the interface layer between the "real" store provider - which is hidden behind a handler - and the rest of the system. it is responsible for checking for topic existance, access permissions, and all the other general admin tasks that are common to all store implementations. This module knows nothing about how the data is actually _stored_ - that knowledge is entirely encapsulated in the handlers. The general contract for methods in the class requires that errors are signalled using exceptions. TWiki::AccessControlException is used for access control exceptions, and Error::Simple for all other types of error. This package has smell factor of *15* ---++ [[TWikiStoreQueryAlgorithmsBruteForceDotPm][TWiki::Store::QueryAlgorithms::BruteForce]] Default brute-force query algorithm Has some basic optimisation: it hoists regular expressions out of the query to use with grep, so we can narrow down the set of topics that we have to evaluate the query on. Not sure exactly where the breakpoint is between the costs of hoisting and the advantages of hoisting. Benchmarks suggest that it's around 6 topics, though this may vary depending on disk speed and memory size. It also depends on the complexity of the query. This package doesn't smell ---++ [[TWikiStoreRcsFileDotPm][TWiki::Store::RcsFile]] This class is PACKAGE PRIVATE to Store, and should never be used from anywhere else. It is the base class of implementations of stores that manipulate RCS format files. The general contract of the methods on this class and its subclasses calls for errors to be signalled by Error::Simple exceptions. Refer to Store.pm for models of usage. This package has smell factor of *11* ---++ [[TWikiStoreRcsLiteDotPm][TWiki::Store::RcsLite]] This package does not publish any methods. It implements the virtual methods of the [[TWikiStoreRcsFileDotPm][TWiki::Store::RcsFile]] superclass. Simple replacement for RCS. Doesn't support: * branches * locking Neither of which are used (or needed) by TWiki. This module doesn't know anything about the content of the topic There is one of these object for each file stored under RCSLite. This object is PACKAGE PRIVATE to Store, and should NEVER be used from anywhere else. FIXME: * need to tidy up dealing with \n for differences * still have difficulty on line ending at end of sequences, consequence of doing a line based diff ---++ File format <verbatim> rcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num }* sym ::= {digit}* idchar {idchar | digit }* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | : </verbatim> Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use. Revisions consist of a sequence of 'a' and 'd' edits that need to be applied to rev N+1 to get rev N. Each edit has an offset (number of lines from start) and length (number of lines). For 'a', the edit is followed by length lines (the lines to be inserted in the text). For example: d1 3 means "delete three lines starting with line 1 a4 2 means "insert two lines at line 4' xxxxxx is the new line 4 yyyyyy is the new line 5 This package has smell factor of *2* ---++ [[TWikiStoreRcsWrapDotPm][TWiki::Store::RcsWrap]] This package does not publish any methods. It implements the virtual methods of the [[TWikiStoreRcsFileDotPm][TWiki::Store::RcsFile]] superclass. Wrapper around the RCS commands required by TWiki. There is one of these object for each file stored under RCS. This package has smell factor of *3* ---++ [[TWikiStoreSearchAlgorithmsForkingDotPm][TWiki::Store::SearchAlgorithms::Forking]] Forking implementation of the RCS cache search. ---++ search($searchString, $topics, $options, $sDir) -> \%seen Search .txt files in $dir for $searchString. See RcsFile::searchInWebContent for details. This package has smell factor of *3* ---++ [[TWikiStoreSearchAlgorithmsPurePerlDotPm][TWiki::Store::SearchAlgorithms::PurePerl]] Pure perl implementation of the RCS cache search. ---++ search($searchString, $topics, $options, $sDir) -> \%seen Search .txt files in $dir for $string. See RcsFile::searchInWebContent for details. This package doesn't smell ---++ [[TWikiTemplatesDotPm][TWiki::Templates]] Support for the TWiki template language. This package has smell factor of *2* ---++ [[TWikiTimeDotPm][TWiki::Time]] Time handling functions. This package has smell factor of *5* ---++ [[TWikiUIChangeFormDotPm][TWiki::UI::ChangeForm]] Service functions used by the UI packages This package doesn't smell ---++ [[TWikiUIDotPm][]] This package doesn't smell ---++ [[TWikiUIEditDotPm][TWiki::UI::Edit]] Edit command handler This package has smell factor of *1* ---++ [[TWikiUIManageDotPm][TWiki::UI::Manage]] UI functions for web, topic and user management This package has smell factor of *4* ---++ [[TWikiUIOopsDotPm][TWiki::UI::Oops]] UI delegate for oops function This package doesn't smell ---++ [[TWikiUIRDiffDotPm][TWiki::UI::RDiff]] UI functions for diffing. This package has smell factor of *12* ---++ [[TWikiUIRegisterDotPm][TWiki::UI::Register]] User registration handling. This package has smell factor of *8* ---++ [[TWikiUIRestDotPm][TWiki::UI::Rest]] UI delegate for REST interface This package has smell factor of *1* ---++ [[TWikiUISaveDotPm][TWiki::UI::Save]] UI delegate for save function This package has smell factor of *1* ---++ [[TWikiUISearchDotPm][TWiki::UI::Search]] UI functions for searching. This package has smell factor of *3* ---++ [[TWikiUIStatisticsDotPm][TWiki::UI::Statistics]] Statistics extraction and presentation | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 4 | |||||||
> > | This package has smell factor of 1 | |||||||
TWiki::UI::UploadUI delegate for attachment management functions This package has smell factor of 2TWiki::UI::ViewUI delegate for view function | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 3 | |||||||
> > | This package has smell factor of 4 | |||||||
TWiki::UserMappingThis is a virtual base class (a.k.a an interface) for all user mappers. It is not useable as a mapping in TWiki - use the BaseUserMapping for default behaviour. User mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. See TWiki::Users::BaseUserMapping and TWiki::Users::TWikiUserMapping for the default implementations of this interface. If you want to write a user mapper, you will need to implement the methods described in this class. User mappings work by mapping both login names and display names to a canonical user id. This user id is composed from a prefix that defines the mapper in use (something like 'BaseUserMapping_' or 'LdapUserMapping_') and a unique user id that the mapper uses to identify the user. The null prefix is reserver for the TWikiUserMapping for compatibility with old TWiki releases. Note: in all the following documentation,$cUID refers to a
canonical user id.
This package has smell factor of 1
TWiki::Users::ApacheHtpasswdUserPassword manager that uses Apache::HtPasswd to manage users and passwords. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
Duplicates functionality of
=TWiki::Users::HtPasswdUser=;
provided mainly as an example of how to write a new password manager.
This package has smell factor of 1
TWiki::Users::BaseUserMappingUser mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. The BaseMapper provides support for a small number of predefined users. No registration - this is a read only usermapper. It uses the mapper prefix 'BaseUserMapping_'.Users
Groups
TWiki::UsersThis package provides services for the lookup and manipulation of login and wiki names of users, and their authentication. It is a Facade that presents a common interface to the User Mapping and Password modules. The rest of the core should only use the methods of this package, and should never call the mapping or password managers directly. TWiki uses the concept of a login name which is used to authenticate a user. A login name maps to a wiki name that is used to identify the user for display. Each login name is unique to a single user, though several login names may map to the same wiki name. Using this module (and the associated plug-in user mapper) TWiki supports the concept of groups. Groups are sets of login names that are treated equally for the purposes of access control. Group names do not have to be wiki names, though it is helpful for display if they are. Internally in the code TWiki uses something referred to as a _canonical user id_ or just user id. The user id is also used externally to uniquely identify the user when (for example) recording topic histories. The user id is usually just the login name, but it doesn't need to be. It just has to be a unique 7-bit alphanumeric and underscore string that can be mapped to/from login and wiki names by the user mapper. The canonical user id should never be seen by a user. On the other hand, core code should never use anything but a canonical user id to refer to a user. Terminology
| ||||||||
Changed: | ||||||||
< < | This package has smell factor of 5 | |||||||
> > | This package has smell factor of 6 | |||||||
TWiki::Users::HtPasswdUserSupport for htpasswd and htdigest format password files. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
This package has smell factor of 3
TWiki::Users::PasswordBase class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like. The methods of this class should be overridded by subclasses that want to implement other password handling methods. This package doesn't smell | ||||||||
Added: | ||||||||
> > | TWiki::Users::TWikiUserMapping | |||||||
Changed: | ||||||||
< < | There were a total of 204 smells | |||||||
> > | The User mapping is the process by which TWiki maps from a username (a login name) | |||||||
Added: | ||||||||
> > | to a wikiname and back. It is also where groups are defined.
By default TWiki maintains user topics and group topics in the Main that
define users and group. These topics are
| |||||||
TWiki Source Code Packages![]() pod , so it always matches the running code
On this page:
[[CGISessionDotPm][]]This package doesn't smell[[CGISessionDriverDBIDotPm][]]This package doesn't smell[[CGISessionDriverDb_fileDotPm][]]This package doesn't smell[[CGISessionDriverDotPm][]]This package doesn't smell[[CGISessionDriverFileDotPm][]]This package doesn't smell[[CGISessionDriverMysqlDotPm][]]This package doesn't smell[[CGISessionDriverPostgresqlDotPm][]]This package doesn't smell[[CGISessionDriverSqliteDotPm][]]This package doesn't smell[[CGISessionErrorHandlerDotPm][]]This package doesn't smell[[CGISessionIDIncrDotPm][]]This package doesn't smell[[CGISessionIDMd5DotPm][]]This package doesn't smell[[CGISessionSerializeDefaultDotPm][]]This package doesn't smell[[CGISessionSerializeFreezethawDotPm][]]This package doesn't smell[[CGISessionSerializeJsonDotPm][]]This package doesn't smell[[CGISessionSerializeStorableDotPm][]]This package doesn't smell[[CGISessionSerializeYamlDotPm][]]This package doesn't smell[[CGISessionTutorialDotPm][]]This package doesn't smell[[MonitorDotPm][]]This package doesn't smellTWiki::AccessControlExceptionException used raise an access control violation. This exception has the following fields:
TWiki::AccessA singleton object of this class manages the access control database. This package doesn't smellTWiki::AggregateIteratorcombine multiple iterators This package doesn't smellTWiki::AttachA singleton object of this class is used to deal with attachments to topics. This package doesn't smellTWiki::AttrsClass of attribute sets, designed for parsing and storing attribute values from a TWiki tag e.g.%TAG{"joe" fred="bad" joe="mad"}%
An attribute set is a hash containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the hash.
Attributes declared later in the string will override those of the same
name defined earlier. The one exception to this is the _DEFAULT key, where
the first instance is always taken.
As well as the default TWiki syntax (parameter values double-quoted)
this class also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values.
The extended syntax has to be enabled by passing the $friendly parameter
to new .
This package doesn't smell
TWiki::CompatibilitySupport for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed. This package has smell factor of 2TWiki::Configure::LoadPurposeThis module consists of just a single subroutinereadConfig . It allows to
safely modify configuration variables for one single run without affecting
normal TWiki operation.
This package doesn't smell
[[TWikiConfigureUIsEXTENDDotPm][]]This package has smell factor of 2TWikiTWiki operates by creating a singleton object (known as the Session object) that acts as a point of reference for all the different modules in the system. This package is the class for this singleton, and also contains the vast bulk of the basic constants and the per- site configuration mechanisms. Global variables are avoided wherever possible to avoid problems with CGI accelerators such as mod_perl.Public Data members
[[TWikiEngineDotPm][]]This package has smell factor of 1TWiki::EngineExceptionException used to raise an engine related error. This exception has the following fields:
TWiki::FormObject representing a single form definition. Form definitions are mainly used to control rendering of a form for editing, though there is some application login there that handles transferring values between edits and saves. A form definition consists of a TWiki::Form object, which has a list of field definitions. Each field definition is an object of a type derived from TWiki::Form::FieldDefinition. These objects are responsible for the actual syntax and semantics of the field type. Form definitions are parsed from TWiki tables, and the types are mapped by name to a class declared in TWiki::Form::* - for example, thetext type is mapped
to TWiki::Form::Text and the checkbox type to TWiki::Form::Checkbox .
The TWiki::Form::FieldDefinition class declares default behaviours for
types that accept a single value in their definitions. The
TWiki::Form::ListFieldDefinition extends this for types that have lists
of possible values.
This package has smell factor of 4
TWiki::Form::FieldDefinitionBase class of all field definition classes. Type-specific classes are derived from this class to define specific per-type behaviours. This class also provides default behaviours for when a specific type cannot be loaded. This package doesn't smellTWiki::Form::ListFieldDefinitionForm field definitions that accept lists of values in the field definition. This is different to being multi-valued, which means the field type can store multiple values. This package has smell factor of 1[[TWikiFormSelectDotPm][]]This package doesn't smellTWiki::Func<-- STARTINCLUDE required for huge TWikiDocumentation topic -->Official list of stable TWiki functions for Plugin developers This module defines official functions that TWiki plugins can use to interact with the TWiki engine and content. Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template plugin and documentation on how to write a plugin. Plugins should only use functions published in this module. If you use functions in other TWiki libraries you might create a security hole and you will probably need to change your plugin when you upgrade TWiki. Deprecated functions will still work in older code, though they should not be called in new plugins and should be replaced in older plugins as soon as possible. The version of the TWiki::Func module is defined by the VERSION number of the TWiki::Plugins module, currently 6.10. This can be shown by the %PLUGINVERSION% TWiki variable, and accessed in code using
$TWiki::Plugins::VERSION . The 'Since' field in the function
documentation refers to $TWiki::Plugins::VERSION .
Notes on use of $TWiki::Plugins::VERSION (from 1.2 forwards): | ||||||||
Added: | ||||||||
> > | ||||||||
| ||||||||
Added: | ||||||||
> > | ||||||||
A full history of the changes to this API can be found at the end of this
topic.
This package has smell factor of 1
TWiki::I18NSupport for strings translation and language detection. This package has smell factor of 2TWiki::I18N::ExtractSupport translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon). This package has smell factor of 1TWiki::If::NodeNode class for the result of an If statement parse This package doesn't smellTWiki::If::OP_iswebThis package doesn't smellTWiki::If::ParserSupport for the conditions in %IF{} statements. This package doesn't smellTWiki::Infix::ErrorClass of errors used with TWiki::Infix::Parser This package doesn't smellTWiki::Infix::NodeBase class for node types generated by Infix::Parser. You don't have to use it, but it may be useful. This package doesn't smellTWiki::Infix::ParserA simple stack-based parser that parses infix expressions with nonary, unary and binary operators specified using an operator table. Escapes are supported in strings, using backslash. This package doesn't smellTWiki::LineIteratorIterator over the lines in a file This package doesn't smellTWiki::ListIteratorIterator over a list This package doesn't smellTWiki::LoginManager::ApacheLoginThis is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g.,viewauth -> view , editauth -> edit , and so on.
See also TWikiUserAuthentication.
Subclass of TWiki::LoginManager; see that class for documentation of the
methods of this class.
This package has smell factor of 1
TWiki::LoginManagerThe package is also a Factory for login managers and also the base class for all login managers. On it's own, an object of this class is used when you specify 'none' in the security setup section of configure. When it is used, logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class. If you are building a new login manager, then you should write a new subclass of this class, implementing the methods marked as VIRTUAL. There are already examples in thelib/TWiki/LoginManager directory.
The class has extensive tracing, which is enabled by
$TWiki::cfg{Trace}{LoginManager.pm}. The tracing is done in such a way as to
let the perl optimiser optimise out the trace function as a no-op if tracing
is disabled.
Here's an overview of how it works:
Early in TWiki::new, the login manager is created. The creation of the login
manager does two things:
ObjectData =twikiThe TWiki object this login manager is attached to. This package has smell factor of 8[[TWikiLoginManagerSessionDotPm][]]This package doesn't smellTWiki::LoginManager::TemplateLoginThis is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. Subclass of TWiki::LoginManager; see that class for documentation of the methods of this class. This package has smell factor of 2TWiki::MergeSupport for merging strings This package has smell factor of 1TWiki::MetaAll TWiki topics have data (text) and meta-data (information about the topic). Meta-data includes information such as file attachments, form fields, topic parentage etc. When TWiki loads a topic from the store, it represents the meta-data in the topic using an object of this class. A meta-data object is a hash of different types of meta-data (keyed on the type, such as 'FIELD' and 'TOPICINFO'). Each entry in the hash is an array, where each entry in the array contains another hash of the key=value pairs, corresponding to a single meta-datum. If there may be multiple entries of the same top-level type (i.e. for FIELD and FILEATTACHMENT) then the array has multiple entries. These types are referred to as "keyed" types. The array entries are keyed with the attribute 'name' which must be in each entry in the array. For unkeyed types, the array has only one entry. Pictorially,
TWiki::NetObject that brokers access to network resources. This package has smell factor of 3TWiki::Net::HTTPResponseFakeup of HTTP::Response for use when LWP is not available. Only implements a small subset of the HTTP::Response methods:
TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires
the name of an oops template file from the templates directory.
This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
Plugins may throw TWiki::OopsException. For example:
use Error; ... throw TWiki::OopsException( 'bathplugin', def => 'toestuck', web => $web, topic => $topic, params => [ 'bigtoe', 'hot tap' ] ); This package doesn't smell ---++ [[TWikiPluginDotPm][]] This package has smell factor of *2* ---++ [[TWikiPluginsDotPm][TWiki::Plugins]] This module defines the singleton object that handles Plugins loading, initialization and execution. This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins. This package doesn't smell ---++ [[TWikiPluralsDotPm][TWiki::Plurals]] Handle conversion of plural topic names to singular form. This package doesn't smell ---++ [[TWikiPrefsDotPm][TWiki::Prefs]] The Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these. Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier. The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!) This package doesn't smell ---++ [[TWikiPrefsParserDotPm][TWiki::Prefs::Parser]] This Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics. This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in. This package has smell factor of *1* ---++ [[TWikiPrefsPrefsCacheDotPm][TWiki::Prefs::PrefsCache]] The PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values: * {locals} Contains all locals at this level. Locals are values that only apply when the current topic is the topic where the local is defined. The variable names are decorated with the locality where they apply. * {values} contains all sets, locals, and all values inherited from the parent level As each cache level is built, the values are copied down from the parent cache level. This sounds monstrously inefficient, but in fact perl does this a lot better than doing a multi-level lookup when a value is referenced. This is especially important when many prefs lookups may be done in a session, for example when searching. This package doesn't smell ---++ [[TWikiQueryHoistREsDotPm][TWiki::Query::HoistREs]] Static functions to extract regular expressions from queries. The REs can be used in caching stores that use the TWiki standard inline meta-data representation to pre-filter topic lists for more efficient query matching. See =Store/RcsFile.pm= for an example of usage. This package doesn't smell ---++ [[TWikiQueryNodeDotPm][TWiki::Query]] A Query object is a representation of a query over the TWiki database. Fields are given by name, and values by strings or numbers. Strings should always be surrounded by 'single-quotes'. Numbers can be signed integers or decimals. Single quotes in values may be escaped using backslash (\). See TWiki.QuerySearch for details of the query language. At the time of writing only a subset of the entire query language is supported, for use in searching. A query object implements the =evaluate= method as its general contract with the rest of the world. This method does a "hard work" evaluation of the parser tree. Of course, smarter Store implementations should be able to do it better.... This package has smell factor of *2* ---++ [[TWikiQueryParserDotPm][TWiki::Query::Parser]] Parser for queries This package doesn't smell ---++ [[TWikiRenderDotPm][TWiki::Render]] This module provides most of the actual HTML rendering code in TWiki. This package has smell factor of *22* ---++ [[TWikiRequestDotPm][]] This package has smell factor of *1* ---++ [[TWikiResponseDotPm][]] This package doesn't smell ---++ [[TWikiSandboxDotPm][TWiki::Sandbox]] This object provides an interface to the outside world. All calls to system functions, or handling of file names, should be brokered by this object. NOTE: TWiki creates a singleton sandbox that is *shared* by all TWiki runs under a single mod_perl instance. If any TWiki run modifies the sandbox, that modification will carry over in to subsequent runs. Be very, very careful! This package has smell factor of *4* ---++ [[TWikiSearchDotPm][TWiki::Search]] This module implements all the search functionality. This package has smell factor of *13* ---++ [[TWikiStoreDotPm][TWiki::Store]] This module hosts the generic storage backend. This module provides the interface layer between the "real" store provider - which is hidden behind a handler - and the rest of the system. it is responsible for checking for topic existance, access permissions, and all the other general admin tasks that are common to all store implementations. This module knows nothing about how the data is actually _stored_ - that knowledge is entirely encapsulated in the handlers. The general contract for methods in the class requires that errors are signalled using exceptions. TWiki::AccessControlException is used for access control exceptions, and Error::Simple for all other types of error. This package has smell factor of *15* ---++ [[TWikiStoreQueryAlgorithmsBruteForceDotPm][TWiki::Store::QueryAlgorithms::BruteForce]] Default brute-force query algorithm Has some basic optimisation: it hoists regular expressions out of the query to use with grep, so we can narrow down the set of topics that we have to evaluate the query on. Not sure exactly where the breakpoint is between the costs of hoisting and the advantages of hoisting. Benchmarks suggest that it's around 6 topics, though this may vary depending on disk speed and memory size. It also depends on the complexity of the query. This package doesn't smell ---++ [[TWikiStoreRcsFileDotPm][TWiki::Store::RcsFile]] This class is PACKAGE PRIVATE to Store, and should never be used from anywhere else. It is the base class of implementations of stores that manipulate RCS format files. The general contract of the methods on this class and its subclasses calls for errors to be signalled by Error::Simple exceptions. Refer to Store.pm for models of usage. This package has smell factor of *11* ---++ [[TWikiStoreRcsLiteDotPm][TWiki::Store::RcsLite]] This package does not publish any methods. It implements the virtual methods of the [[TWikiStoreRcsFileDotPm][TWiki::Store::RcsFile]] superclass. Simple replacement for RCS. Doesn't support: * branches * locking Neither of which are used (or needed) by TWiki. This module doesn't know anything about the content of the topic There is one of these object for each file stored under RCSLite. This object is PACKAGE PRIVATE to Store, and should NEVER be used from anywhere else. FIXME: * need to tidy up dealing with \n for differences * still have difficulty on line ending at end of sequences, consequence of doing a line based diff ---++ File format <verbatim> rcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num }* sym ::= {digit}* idchar {idchar | digit }* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | : </verbatim> Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use. Revisions consist of a sequence of 'a' and 'd' edits that need to be applied to rev N+1 to get rev N. Each edit has an offset (number of lines from start) and length (number of lines). For 'a', the edit is followed by length lines (the lines to be inserted in the text). For example: d1 3 means "delete three lines starting with line 1 a4 2 means "insert two lines at line 4' xxxxxx is the new line 4 yyyyyy is the new line 5 This package has smell factor of *2* ---++ [[TWikiStoreRcsWrapDotPm][TWiki::Store::RcsWrap]] This package does not publish any methods. It implements the virtual methods of the [[TWikiStoreRcsFileDotPm][TWiki::Store::RcsFile]] superclass. Wrapper around the RCS commands required by TWiki. There is one of these object for each file stored under RCS. This package has smell factor of *3* ---++ [[TWikiStoreSearchAlgorithmsForkingDotPm][TWiki::Store::SearchAlgorithms::Forking]] Forking implementation of the RCS cache search. ---++ search($searchString, $topics, $options, $sDir) -> \%seen Search .txt files in $dir for $searchString. See RcsFile::searchInWebContent for details. This package has smell factor of *3* ---++ [[TWikiStoreSearchAlgorithmsPurePerlDotPm][TWiki::Store::SearchAlgorithms::PurePerl]] Pure perl implementation of the RCS cache search. ---++ search($searchString, $topics, $options, $sDir) -> \%seen Search .txt files in $dir for $string. See RcsFile::searchInWebContent for details. This package doesn't smell ---++ [[TWikiTemplatesDotPm][TWiki::Templates]] Support for the TWiki template language. This package has smell factor of *2* ---++ [[TWikiTimeDotPm][TWiki::Time]] Time handling functions. This package has smell factor of *5* ---++ [[TWikiUIChangeFormDotPm][TWiki::UI::ChangeForm]] Service functions used by the UI packages This package doesn't smell ---++ [[TWikiUIDotPm][]] This package doesn't smell ---++ [[TWikiUIEditDotPm][TWiki::UI::Edit]] Edit command handler This package has smell factor of *1* ---++ [[TWikiUIManageDotPm][TWiki::UI::Manage]] UI functions for web, topic and user management This package has smell factor of *4* ---++ [[TWikiUIOopsDotPm][TWiki::UI::Oops]] UI delegate for oops function This package doesn't smell ---++ [[TWikiUIRDiffDotPm][TWiki::UI::RDiff]] UI functions for diffing. This package has smell factor of *12* ---++ [[TWikiUIRegisterDotPm][TWiki::UI::Register]] User registration handling. This package has smell factor of *8* ---++ [[TWikiUIRestDotPm][TWiki::UI::Rest]] UI delegate for REST interface This package has smell factor of *1* ---++ [[TWikiUISaveDotPm][TWiki::UI::Save]] UI delegate for save function This package has smell factor of *1* ---++ [[TWikiUISearchDotPm][TWiki::UI::Search]] UI functions for searching. This package has smell factor of *3* ---++ [[TWikiUIStatisticsDotPm][TWiki::UI::Statistics]] Statistics extraction and presentation This package has smell factor of *4* ---++ [[TWikiUIUploadDotPm][TWiki::UI::Upload]] UI delegate for attachment management functions This package has smell factor of *2* ---++ [[TWikiUIViewDotPm][TWiki::UI::View]] UI delegate for view function This package has smell factor of *3* ---++ [[TWikiUserMappingDotPm][TWiki::UserMapping]] This is a virtual base class (a.k.a an interface) for all user mappers. It is *not* useable as a mapping in TWiki - use the BaseUserMapping for default behaviour. User mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. See TWiki::Users::BaseUserMapping and TWiki::Users::TWikiUserMapping for the default implementations of this interface. If you want to write a user mapper, you will need to implement the methods described in this class. User mappings work by mapping both login names and display names to a _canonical user id_. This user id is composed from a prefix that defines the mapper in use (something like 'BaseUserMapping_' or 'LdapUserMapping_') and a unique user id that the mapper uses to identify the user. The null prefix is reserver for the TWikiUserMapping for compatibility with old TWiki releases. __Note:__ in all the following documentation, =$cUID= refers to a *canonical user id*. This package has smell factor of *1* ---++ [[TWikiUsersApacheHtpasswdUserDotPm][TWiki::Users::ApacheHtpasswdUser]] Password manager that uses Apache::HtPasswd to manage users and passwords. Subclass of [[TWikiUsersPasswordDotPm][ =TWiki::Users::Password= ]]. See documentation of that class for descriptions of the methods of this class. Duplicates functionality of [[TWikiUsersHtPasswdUserDotPm][ =TWiki::Users::HtPasswdUser=]]; provided mainly as an example of how to write a new password manager. This package has smell factor of *1* ---++ [[TWikiUsersBaseUserMappingDotPm][TWiki::Users::BaseUserMapping]] User mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. The BaseMapper provides support for a small number of predefined users. No registration - this is a read only usermapper. It uses the mapper prefix 'BaseUserMapping_'. ---++ Users * TWikiAdmin - uses the password that was set in Configure (IF its not null) * TWikiGuest * UnknownUser * TWikiContributor - 1 Jan 2005 * TWikiRegistrationAgent - 1 Jan 2005 ---+++ Groups * $TWiki::cfg{SuperAdminGroup} * TWikiBaseGroup This package has smell factor of *2* ---++ [[TWikiUsersDotPm][TWiki::Users]] This package provides services for the lookup and manipulation of login and wiki names of users, and their authentication. It is a Facade that presents a common interface to the User Mapping and Password modules. The rest of the core should *only* use the methods of this package, and should *never* call the mapping or password managers directly. TWiki uses the concept of a _login name_ which is used to authenticate a user. A login name maps to a _wiki name_ that is used to identify the user for display. Each login name is unique to a single user, though several login names may map to the same wiki name. Using this module (and the associated plug-in user mapper) TWiki supports the concept of _groups_. Groups are sets of login names that are treated equally for the purposes of access control. Group names do not have to be wiki names, though it is helpful for display if they are. Internally in the code TWiki uses something referred to as a _canonical user id_ or just _user id_. The user id is also used externally to uniquely identify the user when (for example) recording topic histories. The user id is *usually* just the login name, but it doesn't need to be. It just has to be a unique 7-bit alphanumeric and underscore string that can be mapped to/from login and wiki names by the user mapper. The canonical user id should *never* be seen by a user. On the other hand, core code should never use anything *but* a canonical user id to refer to a user. *Terminology* * A *login name* is the name used to log in to TWiki. Each login name is assumed to be unique to a human. The Password module is responsible for authenticating and manipulating login names. * A *canonical user id* is an internal TWiki representation of a user. Each canonical user id maps 1:1 to a login name. * A *wikiname* is how a user is displayed. Many user ids may map to a single wikiname. The user mapping module is responsible for mapping the user id to a wikiname. * A *group id* represents a group of users and other groups. The user mapping module is responsible for mapping from a group id to a list of canonical user ids for the users in that group. * An *email* is an email address asscoiated with a *login name*. A single login name may have many emails. *NOTE:* * wherever the code references $cUID, its a canonical_id * wherever the code references $group, its a group_name * $name may be a group or a cUID This package has smell factor of *5* ---++ [[TWikiUsersHtPasswdUserDotPm][TWiki::Users::HtPasswdUser]] Support for htpasswd and htdigest format password files. Subclass of [[TWikiUsersPasswordDotPm][ =TWiki::Users::Password= ]]. See documentation of that class for descriptions of the methods of this class. This package has smell factor of *3* ---++ [[TWikiUsersPasswordDotPm][TWiki::Users::Password]] Base class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like. The methods of this class should be overridded by subclasses that want to implement other password handling methods. This package doesn't smell There were a total of *204* smells |
TWiki Source Code Packages![]() pod , so it always matches the running code
On this page:
[[CGISessionDotPm][]]This package doesn't smell[[CGISessionDriverDBIDotPm][]]This package doesn't smell[[CGISessionDriverDb_fileDotPm][]]This package doesn't smell[[CGISessionDriverDotPm][]]This package doesn't smell[[CGISessionDriverFileDotPm][]]This package doesn't smell[[CGISessionDriverMysqlDotPm][]]This package doesn't smell[[CGISessionDriverPostgresqlDotPm][]]This package doesn't smell[[CGISessionDriverSqliteDotPm][]]This package doesn't smell[[CGISessionErrorHandlerDotPm][]]This package doesn't smell[[CGISessionIDIncrDotPm][]]This package doesn't smell[[CGISessionIDMd5DotPm][]]This package doesn't smell[[CGISessionSerializeDefaultDotPm][]]This package doesn't smell[[CGISessionSerializeFreezethawDotPm][]]This package doesn't smell[[CGISessionSerializeJsonDotPm][]]This package doesn't smell[[CGISessionSerializeStorableDotPm][]]This package doesn't smell[[CGISessionSerializeYamlDotPm][]]This package doesn't smell[[CGISessionTutorialDotPm][]]This package doesn't smell[[MonitorDotPm][]]This package doesn't smellTWiki::AccessControlExceptionException used raise an access control violation. This exception has the following fields:
TWiki::AccessA singleton object of this class manages the access control database. This package doesn't smellTWiki::AggregateIteratorcombine multiple iterators This package doesn't smellTWiki::AttachA singleton object of this class is used to deal with attachments to topics. This package doesn't smellTWiki::AttrsClass of attribute sets, designed for parsing and storing attribute values from a TWiki tag e.g.%TAG{"joe" fred="bad" joe="mad"}%
An attribute set is a hash containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the hash.
Attributes declared later in the string will override those of the same
name defined earlier. The one exception to this is the _DEFAULT key, where
the first instance is always taken.
As well as the default TWiki syntax (parameter values double-quoted)
this class also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values.
The extended syntax has to be enabled by passing the $friendly parameter
to new .
This package doesn't smell
TWiki::CompatibilitySupport for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed. This package has smell factor of 2TWiki::Configure::LoadPurposeThis module consists of just a single subroutinereadConfig . It allows to
safely modify configuration variables for one single run without affecting
normal TWiki operation.
This package doesn't smell
[[TWikiConfigureUIsEXTENDDotPm][]]This package has smell factor of 2TWikiTWiki operates by creating a singleton object (known as the Session object) that acts as a point of reference for all the different modules in the system. This package is the class for this singleton, and also contains the vast bulk of the basic constants and the per- site configuration mechanisms. Global variables are avoided wherever possible to avoid problems with CGI accelerators such as mod_perl.Public Data members
[[TWikiEngineDotPm][]]This package has smell factor of 1TWiki::EngineExceptionException used to raise an engine related error. This exception has the following fields:
TWiki::FormObject representing a single form definition. Form definitions are mainly used to control rendering of a form for editing, though there is some application login there that handles transferring values between edits and saves. A form definition consists of a TWiki::Form object, which has a list of field definitions. Each field definition is an object of a type derived from TWiki::Form::FieldDefinition. These objects are responsible for the actual syntax and semantics of the field type. Form definitions are parsed from TWiki tables, and the types are mapped by name to a class declared in TWiki::Form::* - for example, thetext type is mapped
to TWiki::Form::Text and the checkbox type to TWiki::Form::Checkbox .
The TWiki::Form::FieldDefinition class declares default behaviours for
types that accept a single value in their definitions. The
TWiki::Form::ListFieldDefinition extends this for types that have lists
of possible values.
This package has smell factor of 4
TWiki::Form::FieldDefinitionBase class of all field definition classes. Type-specific classes are derived from this class to define specific per-type behaviours. This class also provides default behaviours for when a specific type cannot be loaded. This package doesn't smellTWiki::Form::ListFieldDefinitionForm field definitions that accept lists of values in the field definition. This is different to being multi-valued, which means the field type can store multiple values. This package has smell factor of 1[[TWikiFormSelectDotPm][]]This package doesn't smellTWiki::Func<-- STARTINCLUDE required for huge TWikiDocumentation topic -->Official list of stable TWiki functions for Plugin developers This module defines official functions that TWiki plugins can use to interact with the TWiki engine and content. Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template plugin and documentation on how to write a plugin. Plugins should only use functions published in this module. If you use functions in other TWiki libraries you might create a security hole and you will probably need to change your plugin when you upgrade TWiki. Deprecated functions will still work in older code, though they should not be called in new plugins and should be replaced in older plugins as soon as possible. The version of the TWiki::Func module is defined by the VERSION number of the TWiki::Plugins module, currently 6.10. This can be shown by the %PLUGINVERSION% TWiki variable, and accessed in code using
$TWiki::Plugins::VERSION . The 'Since' field in the function
documentation refers to $TWiki::Plugins::VERSION .
Notes on use of $TWiki::Plugins::VERSION (from 1.2 forwards):
TWiki::I18NSupport for strings translation and language detection. This package has smell factor of 2TWiki::I18N::ExtractSupport translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon). This package has smell factor of 1TWiki::If::NodeNode class for the result of an If statement parse This package doesn't smellTWiki::If::OP_iswebThis package doesn't smellTWiki::If::ParserSupport for the conditions in %IF{} statements. This package doesn't smellTWiki::Infix::ErrorClass of errors used with TWiki::Infix::Parser This package doesn't smellTWiki::Infix::NodeBase class for node types generated by Infix::Parser. You don't have to use it, but it may be useful. This package doesn't smellTWiki::Infix::ParserA simple stack-based parser that parses infix expressions with nonary, unary and binary operators specified using an operator table. Escapes are supported in strings, using backslash. This package doesn't smellTWiki::LineIteratorIterator over the lines in a file This package doesn't smellTWiki::ListIteratorIterator over a list This package doesn't smellTWiki::LoginManager::ApacheLoginThis is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g.,viewauth -> view , editauth -> edit , and so on.
See also TWikiUserAuthentication.
Subclass of TWiki::LoginManager; see that class for documentation of the
methods of this class.
This package has smell factor of 1
TWiki::LoginManagerThe package is also a Factory for login managers and also the base class for all login managers. On it's own, an object of this class is used when you specify 'none' in the security setup section of configure. When it is used, logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class. If you are building a new login manager, then you should write a new subclass of this class, implementing the methods marked as VIRTUAL. There are already examples in thelib/TWiki/LoginManager directory.
The class has extensive tracing, which is enabled by
$TWiki::cfg{Trace}{LoginManager.pm}. The tracing is done in such a way as to
let the perl optimiser optimise out the trace function as a no-op if tracing
is disabled.
Here's an overview of how it works: | ||||||||
Changed: | ||||||||
< < | Early in TWiki::new, the login manager is created. The creation of the login manager does two things:
| |||||||
> > | Early in TWiki::new, the login manager is created. The creation of the login
manager does two things:
| |||||||
Added: | ||||||||
> > | session yet.
| |||||||
Slightly later in TWiki::new, loginManager->loadSession is called. | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Added: | ||||||||
> > |
| |||||||
Changed: | ||||||||
< < | Later again in TWiki::new, plugins are given a chance to override the username found from the loginManager. | |||||||
> > | Later again in TWiki::new, plugins are given a chance to override the username | |||||||
Added: | ||||||||
> > | found from the loginManager. | |||||||
Changed: | ||||||||
< < | The last step in TWiki::new is to find the user, using whatever user mapping manager is in place. | |||||||
> > | The last step in TWiki::new is to find the user, using whatever user mapping | |||||||
Added: | ||||||||
> > | manager is in place. | |||||||
ObjectData =twikiThe TWiki object this login manager is attached to. This package has smell factor of 8[[TWikiLoginManagerSessionDotPm][]]This package doesn't smellTWiki::LoginManager::TemplateLoginThis is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. Subclass of TWiki::LoginManager; see that class for documentation of the methods of this class. This package has smell factor of 2TWiki::MergeSupport for merging strings This package has smell factor of 1TWiki::MetaAll TWiki topics have data (text) and meta-data (information about the topic). Meta-data includes information such as file attachments, form fields, topic parentage etc. When TWiki loads a topic from the store, it represents the meta-data in the topic using an object of this class. A meta-data object is a hash of different types of meta-data (keyed on the type, such as 'FIELD' and 'TOPICINFO'). Each entry in the hash is an array, where each entry in the array contains another hash of the key=value pairs, corresponding to a single meta-datum. If there may be multiple entries of the same top-level type (i.e. for FIELD and FILEATTACHMENT) then the array has multiple entries. These types are referred to as "keyed" types. The array entries are keyed with the attribute 'name' which must be in each entry in the array. For unkeyed types, the array has only one entry. Pictorially,
TWiki::NetObject that brokers access to network resources. This package has smell factor of 3TWiki::Net::HTTPResponseFakeup of HTTP::Response for use when LWP is not available. Only implements a small subset of the HTTP::Response methods:
TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires
the name of an oops template file from the templates directory.
This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
Plugins may throw TWiki::OopsException. For example:
use Error; ... throw TWiki::OopsException( 'bathplugin', def => 'toestuck', web => $web, topic => $topic, params => [ 'bigtoe', 'hot tap' ] ); This package doesn't smell ---++ [[TWikiPluginDotPm][]] This package has smell factor of *2* ---++ [[TWikiPluginsDotPm][TWiki::Plugins]] This module defines the singleton object that handles Plugins loading, initialization and execution. This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins. This package doesn't smell ---++ [[TWikiPluralsDotPm][TWiki::Plurals]] Handle conversion of plural topic names to singular form. This package doesn't smell ---++ [[TWikiPrefsDotPm][TWiki::Prefs]] The Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these. Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier. The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!) This package doesn't smell ---++ [[TWikiPrefsParserDotPm][TWiki::Prefs::Parser]] This Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics. This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in. This package has smell factor of *1* ---++ [[TWikiPrefsPrefsCacheDotPm][TWiki::Prefs::PrefsCache]] The PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values: * {locals} Contains all locals at this level. Locals are values that only apply when the current topic is the topic where the local is defined. The variable names are decorated with the locality where they apply. * {values} contains all sets, locals, and all values inherited from the parent level As each cache level is built, the values are copied down from the parent cache level. This sounds monstrously inefficient, but in fact perl does this a lot better than doing a multi-level lookup when a value is referenced. This is especially important when many prefs lookups may be done in a session, for example when searching. This package doesn't smell ---++ [[TWikiQueryHoistREsDotPm][TWiki::Query::HoistREs]] Static functions to extract regular expressions from queries. The REs can be used in caching stores that use the TWiki standard inline meta-data representation to pre-filter topic lists for more efficient query matching. See =Store/RcsFile.pm= for an example of usage. This package doesn't smell ---++ [[TWikiQueryNodeDotPm][TWiki::Query]] A Query object is a representation of a query over the TWiki database. Fields are given by name, and values by strings or numbers. Strings should always be surrounded by 'single-quotes'. Numbers can be signed integers or decimals. Single quotes in values may be escaped using backslash (\). See TWiki.QuerySearch for details of the query language. At the time of writing only a subset of the entire query language is supported, for use in searching. A query object implements the =evaluate= method as its general contract with the rest of the world. This method does a "hard work" evaluation of the parser tree. Of course, smarter Store implementations should be able to do it better.... This package has smell factor of *2* ---++ [[TWikiQueryParserDotPm][TWiki::Query::Parser]] Parser for queries This package doesn't smell ---++ [[TWikiRenderDotPm][TWiki::Render]] This module provides most of the actual HTML rendering code in TWiki. This package has smell factor of *22* ---++ [[TWikiRequestDotPm][]] This package has smell factor of *1* ---++ [[TWikiResponseDotPm][]] This package doesn't smell ---++ [[TWikiSandboxDotPm][TWiki::Sandbox]] This object provides an interface to the outside world. All calls to system functions, or handling of file names, should be brokered by this object. NOTE: TWiki creates a singleton sandbox that is *shared* by all TWiki runs under a single mod_perl instance. If any TWiki run modifies the sandbox, that modification will carry over in to subsequent runs. Be very, very careful! This package has smell factor of *4* ---++ [[TWikiSearchDotPm][TWiki::Search]] This module implements all the search functionality. This package has smell factor of *13* ---++ [[TWikiStoreDotPm][TWiki::Store]] This module hosts the generic storage backend. This module provides the interface layer between the "real" store provider - which is hidden behind a handler - and the rest of the system. it is responsible for checking for topic existance, access permissions, and all the other general admin tasks that are common to all store implementations. This module knows nothing about how the data is actually _stored_ - that knowledge is entirely encapsulated in the handlers. The general contract for methods in the class requires that errors are signalled using exceptions. TWiki::AccessControlException is used for access control exceptions, and Error::Simple for all other types of error. This package has smell factor of *15* ---++ [[TWikiStoreQueryAlgorithmsBruteForceDotPm][TWiki::Store::QueryAlgorithms::BruteForce]] Default brute-force query algorithm Has some basic optimisation: it hoists regular expressions out of the query to use with grep, so we can narrow down the set of topics that we have to evaluate the query on. Not sure exactly where the breakpoint is between the costs of hoisting and the advantages of hoisting. Benchmarks suggest that it's around 6 topics, though this may vary depending on disk speed and memory size. It also depends on the complexity of the query. This package doesn't smell ---++ [[TWikiStoreRcsFileDotPm][TWiki::Store::RcsFile]] This class is PACKAGE PRIVATE to Store, and should never be used from anywhere else. It is the base class of implementations of stores that manipulate RCS format files. The general contract of the methods on this class and its subclasses calls for errors to be signalled by Error::Simple exceptions. Refer to Store.pm for models of usage. This package has smell factor of *11* ---++ [[TWikiStoreRcsLiteDotPm][TWiki::Store::RcsLite]] This package does not publish any methods. It implements the virtual methods of the [[TWikiStoreRcsFileDotPm][TWiki::Store::RcsFile]] superclass. Simple replacement for RCS. Doesn't support: * branches * locking Neither of which are used (or needed) by TWiki. This module doesn't know anything about the content of the topic There is one of these object for each file stored under RCSLite. This object is PACKAGE PRIVATE to Store, and should NEVER be used from anywhere else. FIXME: * need to tidy up dealing with \n for differences * still have difficulty on line ending at end of sequences, consequence of doing a line based diff ---++ File format <verbatim> rcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num }* sym ::= {digit}* idchar {idchar | digit }* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | : </verbatim> Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use. Revisions consist of a sequence of 'a' and 'd' edits that need to be applied to rev N+1 to get rev N. Each edit has an offset (number of lines from start) and length (number of lines). For 'a', the edit is followed by length lines (the lines to be inserted in the text). For example: d1 3 means "delete three lines starting with line 1 a4 2 means "insert two lines at line 4' xxxxxx is the new line 4 yyyyyy is the new line 5 This package has smell factor of *2* ---++ [[TWikiStoreRcsWrapDotPm][TWiki::Store::RcsWrap]] This package does not publish any methods. It implements the virtual methods of the [[TWikiStoreRcsFileDotPm][TWiki::Store::RcsFile]] superclass. Wrapper around the RCS commands required by TWiki. There is one of these object for each file stored under RCS. This package has smell factor of *3* ---++ [[TWikiStoreSearchAlgorithmsForkingDotPm][TWiki::Store::SearchAlgorithms::Forking]] Forking implementation of the RCS cache search. ---++ search($searchString, $topics, $options, $sDir) -> \%seen Search .txt files in $dir for $searchString. See RcsFile::searchInWebContent for details. This package has smell factor of *3* ---++ [[TWikiStoreSearchAlgorithmsPurePerlDotPm][TWiki::Store::SearchAlgorithms::PurePerl]] Pure perl implementation of the RCS cache search. ---++ search($searchString, $topics, $options, $sDir) -> \%seen Search .txt files in $dir for $string. See RcsFile::searchInWebContent for details. This package doesn't smell ---++ [[TWikiTemplatesDotPm][TWiki::Templates]] Support for the TWiki template language. This package has smell factor of *2* ---++ [[TWikiTimeDotPm][TWiki::Time]] Time handling functions. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 7 | |||||||
> > | This package has smell factor of 5 | |||||||
TWiki::UI::ChangeFormService functions used by the UI packages This package doesn't smell[[TWikiUIDotPm][]]This package doesn't smellTWiki::UI::EditEdit command handler This package has smell factor of 1TWiki::UI::ManageUI functions for web, topic and user management This package has smell factor of 4TWiki::UI::OopsUI delegate for oops function This package doesn't smellTWiki::UI::RDiffUI functions for diffing. This package has smell factor of 12TWiki::UI::RegisterUser registration handling. This package has smell factor of 8TWiki::UI::RestUI delegate for REST interface This package has smell factor of 1TWiki::UI::SaveUI delegate for save function This package has smell factor of 1TWiki::UI::SearchUI functions for searching. This package has smell factor of 3TWiki::UI::StatisticsStatistics extraction and presentation This package has smell factor of 4TWiki::UI::UploadUI delegate for attachment management functions This package has smell factor of 2TWiki::UI::ViewUI delegate for view function This package has smell factor of 3TWiki::UserMappingThis is a virtual base class (a.k.a an interface) for all user mappers. It is not useable as a mapping in TWiki - use the BaseUserMapping for default behaviour. User mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. See TWiki::Users::BaseUserMapping and TWiki::Users::TWikiUserMapping for the default implementations of this interface. If you want to write a user mapper, you will need to implement the methods described in this class. User mappings work by mapping both login names and display names to a canonical user id. This user id is composed from a prefix that defines the mapper in use (something like 'BaseUserMapping_' or 'LdapUserMapping_') and a unique user id that the mapper uses to identify the user. The null prefix is reserver for the TWikiUserMapping for compatibility with old TWiki releases. Note: in all the following documentation,$cUID refers to a
canonical user id.
This package has smell factor of 1
TWiki::Users::ApacheHtpasswdUserPassword manager that uses Apache::HtPasswd to manage users and passwords. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
Duplicates functionality of
=TWiki::Users::HtPasswdUser=;
provided mainly as an example of how to write a new password manager.
This package has smell factor of 1
TWiki::Users::BaseUserMappingUser mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. The BaseMapper provides support for a small number of predefined users. No registration - this is a read only usermapper. It uses the mapper prefix 'BaseUserMapping_'.Users
Groups
TWiki::UsersThis package provides services for the lookup and manipulation of login and wiki names of users, and their authentication. It is a Facade that presents a common interface to the User Mapping and Password modules. The rest of the core should only use the methods of this package, and should never call the mapping or password managers directly. TWiki uses the concept of a login name which is used to authenticate a user. A login name maps to a wiki name that is used to identify the user for display. Each login name is unique to a single user, though several login names may map to the same wiki name. Using this module (and the associated plug-in user mapper) TWiki supports the concept of groups. Groups are sets of login names that are treated equally for the purposes of access control. Group names do not have to be wiki names, though it is helpful for display if they are. Internally in the code TWiki uses something referred to as a _canonical user id_ or just user id. The user id is also used externally to uniquely identify the user when (for example) recording topic histories. The user id is usually just the login name, but it doesn't need to be. It just has to be a unique 7-bit alphanumeric and underscore string that can be mapped to/from login and wiki names by the user mapper. The canonical user id should never be seen by a user. On the other hand, core code should never use anything but a canonical user id to refer to a user. Terminology
TWiki::Users::HtPasswdUserSupport for htpasswd and htdigest format password files. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
This package has smell factor of 3
TWiki::Users::PasswordBase class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like. The methods of this class should be overridded by subclasses that want to implement other password handling methods. This package doesn't smell | ||||||||
Changed: | ||||||||
< < | There were a total of 206 smells | |||||||
> > | There were a total of 204 smells | |||||||
TWiki Source Code Packages![]() pod , so it always matches the running code
On this page:
[[CGISessionDotPm][]]This package doesn't smell[[CGISessionDriverDBIDotPm][]]This package doesn't smell[[CGISessionDriverDb_fileDotPm][]]This package doesn't smell[[CGISessionDriverDotPm][]]This package doesn't smell[[CGISessionDriverFileDotPm][]]This package doesn't smell[[CGISessionDriverMysqlDotPm][]]This package doesn't smell[[CGISessionDriverPostgresqlDotPm][]]This package doesn't smell[[CGISessionDriverSqliteDotPm][]]This package doesn't smell[[CGISessionErrorHandlerDotPm][]]This package doesn't smell[[CGISessionIDIncrDotPm][]]This package doesn't smell[[CGISessionIDMd5DotPm][]]This package doesn't smell[[CGISessionSerializeDefaultDotPm][]]This package doesn't smell[[CGISessionSerializeFreezethawDotPm][]]This package doesn't smell[[CGISessionSerializeJsonDotPm][]]This package doesn't smell[[CGISessionSerializeStorableDotPm][]]This package doesn't smell[[CGISessionSerializeYamlDotPm][]]This package doesn't smell[[CGISessionTutorialDotPm][]]This package doesn't smell[[MonitorDotPm][]]This package doesn't smellTWiki::AccessControlExceptionException used raise an access control violation. This exception has the following fields:
TWiki::AccessA singleton object of this class manages the access control database. This package doesn't smellTWiki::AggregateIteratorcombine multiple iterators This package doesn't smellTWiki::AttachA singleton object of this class is used to deal with attachments to topics. This package doesn't smellTWiki::AttrsClass of attribute sets, designed for parsing and storing attribute values from a TWiki tag e.g.%TAG{"joe" fred="bad" joe="mad"}%
An attribute set is a hash containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the hash.
Attributes declared later in the string will override those of the same
name defined earlier. The one exception to this is the _DEFAULT key, where
the first instance is always taken.
As well as the default TWiki syntax (parameter values double-quoted)
this class also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values.
The extended syntax has to be enabled by passing the $friendly parameter
to new .
This package doesn't smell
TWiki::CompatibilitySupport for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed. This package has smell factor of 2TWiki::Configure::LoadPurposeThis module consists of just a single subroutinereadConfig . It allows to
safely modify configuration variables for one single run without affecting
normal TWiki operation.
This package doesn't smell
[[TWikiConfigureUIsEXTENDDotPm][]]This package has smell factor of 2TWikiTWiki operates by creating a singleton object (known as the Session object) that acts as a point of reference for all the different modules in the system. This package is the class for this singleton, and also contains the vast bulk of the basic constants and the per- site configuration mechanisms. Global variables are avoided wherever possible to avoid problems with CGI accelerators such as mod_perl.Public Data members | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Added: | ||||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < | the current CGI request. | |||||||
> > | the current request. | |||||||
| ||||||||
Changed: | ||||||||
< < | This package has smell factor of 35 | |||||||
> > | This package has smell factor of 36 | |||||||
Added: | ||||||||
> > | [[TWikiEngineDotPm][]]This package has smell factor of 1TWiki::EngineExceptionException used to raise an engine related error. This exception has the following fields:
| |||||||
TWiki::FormObject representing a single form definition. Form definitions are mainly used to control rendering of a form for editing, though there is some application login there that handles transferring values between edits and saves. A form definition consists of a TWiki::Form object, which has a list of field definitions. Each field definition is an object of a type derived from TWiki::Form::FieldDefinition. These objects are responsible for the actual syntax and semantics of the field type. Form definitions are parsed from TWiki tables, and the types are mapped by name to a class declared in TWiki::Form::* - for example, thetext type is mapped
to TWiki::Form::Text and the checkbox type to TWiki::Form::Checkbox .
The TWiki::Form::FieldDefinition class declares default behaviours for
types that accept a single value in their definitions. The
TWiki::Form::ListFieldDefinition extends this for types that have lists
of possible values.
This package has smell factor of 4
TWiki::Form::FieldDefinitionBase class of all field definition classes. Type-specific classes are derived from this class to define specific per-type behaviours. This class also provides default behaviours for when a specific type cannot be loaded. This package doesn't smellTWiki::Form::ListFieldDefinitionForm field definitions that accept lists of values in the field definition. This is different to being multi-valued, which means the field type can store multiple values. This package has smell factor of 1[[TWikiFormSelectDotPm][]]This package doesn't smellTWiki::Func<-- STARTINCLUDE required for huge TWikiDocumentation topic -->Official list of stable TWiki functions for Plugin developers | ||||||||
Changed: | ||||||||
< < | This module defines official functions that Plugins | |||||||
> > | This module defines official functions that TWiki plugins | |||||||
can use to interact with the TWiki engine and content. | ||||||||
Changed: | ||||||||
< < | Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template Plugin and documentation on how to write a Plugin. | |||||||
> > | Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template | |||||||
Added: | ||||||||
> > | plugin and documentation on how to write a plugin. | |||||||
Plugins should only use functions published in this module. If you use functions in other TWiki libraries you might create a security hole and | ||||||||
Changed: | ||||||||
< < | you will probably need to change your Plugin when you upgrade TWiki. | |||||||
> > | you will probably need to change your plugin when you upgrade TWiki. | |||||||
Deprecated functions will still work in older code, though they should | ||||||||
Changed: | ||||||||
< < | not be called in new Plugins and should be replaced in older Plugins | |||||||
> > | not be called in new plugins and should be replaced in older plugins | |||||||
as soon as possible.
The version of the TWiki::Func module is defined by the VERSION number of the
TWiki::Plugins module, currently 6.10. This can be shown
by the %PLUGINVERSION% TWiki variable, and accessed in code using
$TWiki::Plugins::VERSION . The 'Since' field in the function
documentation refers to $TWiki::Plugins::VERSION .
Notes on use of $TWiki::Plugins::VERSION (from 1.2 forwards):
TWiki::I18NSupport for strings translation and language detection. This package has smell factor of 2TWiki::I18N::ExtractSupport translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon). This package has smell factor of 1TWiki::If::NodeNode class for the result of an If statement parse This package doesn't smellTWiki::If::OP_iswebThis package doesn't smellTWiki::If::ParserSupport for the conditions in %IF{} statements. This package doesn't smellTWiki::Infix::ErrorClass of errors used with TWiki::Infix::Parser This package doesn't smellTWiki::Infix::NodeBase class for node types generated by Infix::Parser. You don't have to use it, but it may be useful. This package doesn't smellTWiki::Infix::ParserA simple stack-based parser that parses infix expressions with nonary, unary and binary operators specified using an operator table. Escapes are supported in strings, using backslash. This package doesn't smellTWiki::LineIteratorIterator over the lines in a file This package doesn't smellTWiki::ListIteratorIterator over a list This package doesn't smellTWiki::LoginManager::ApacheLoginThis is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g.,viewauth -> view , editauth -> edit , and so on.
See also TWikiUserAuthentication.
Subclass of TWiki::LoginManager; see that class for documentation of the
methods of this class.
This package has smell factor of 1
TWiki::LoginManagerThe package is also a Factory for login managers and also the base class for all login managers. On it's own, an object of this class is used when you specify 'none' in the security setup section of configure. When it is used, logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class. If you are building a new login manager, then you should write a new subclass of this class, implementing the methods marked as VIRTUAL. There are already examples in thelib/TWiki/LoginManager directory.
The class has extensive tracing, which is enabled by
$TWiki::cfg{Trace}{LoginManager.pm}. The tracing is done in such a way as to
let the perl optimiser optimise out the trace function as a no-op if tracing
is disabled.
Here's an overview of how it works:
Early in TWiki::new, the login manager is created. The creation of the login manager does two things:
ObjectData =twikiThe TWiki object this login manager is attached to. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 7 | |||||||
> > | This package has smell factor of 8 | |||||||
Added: | ||||||||
> > | [[TWikiLoginManagerSessionDotPm][]]This package doesn't smell | |||||||
TWiki::LoginManager::TemplateLoginThis is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. Subclass of TWiki::LoginManager; see that class for documentation of the methods of this class. This package has smell factor of 2TWiki::MergeSupport for merging strings This package has smell factor of 1TWiki::MetaAll TWiki topics have data (text) and meta-data (information about the topic). Meta-data includes information such as file attachments, form fields, topic parentage etc. When TWiki loads a topic from the store, it represents the meta-data in the topic using an object of this class. A meta-data object is a hash of different types of meta-data (keyed on the type, such as 'FIELD' and 'TOPICINFO'). Each entry in the hash is an array, where each entry in the array contains another hash of the key=value pairs, corresponding to a single meta-datum. If there may be multiple entries of the same top-level type (i.e. for FIELD and FILEATTACHMENT) then the array has multiple entries. These types are referred to as "keyed" types. The array entries are keyed with the attribute 'name' which must be in each entry in the array. For unkeyed types, the array has only one entry. Pictorially,
TWiki::NetObject that brokers access to network resources. This package has smell factor of 3TWiki::Net::HTTPResponseFakeup of HTTP::Response for use when LWP is not available. Only implements a small subset of the HTTP::Response methods:
TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires
the name of an oops template file from the templates directory.
This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
Plugins may throw TWiki::OopsException. For example:
use Error; ... throw TWiki::OopsException( 'bathplugin', def => 'toestuck', web => $web, topic => $topic, params => [ 'bigtoe', 'hot tap' ] ); This package doesn't smell ---++ [[TWikiPluginDotPm][]] This package has smell factor of *2* ---++ [[TWikiPluginsDotPm][TWiki::Plugins]] This module defines the singleton object that handles Plugins loading, initialization and execution. This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins. This package doesn't smell ---++ [[TWikiPluralsDotPm][TWiki::Plurals]] Handle conversion of plural topic names to singular form. This package doesn't smell ---++ [[TWikiPrefsDotPm][TWiki::Prefs]] The Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these. Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier. The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!) This package doesn't smell ---++ [[TWikiPrefsParserDotPm][TWiki::Prefs::Parser]] This Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics. This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in. This package has smell factor of *1* ---++ [[TWikiPrefsPrefsCacheDotPm][TWiki::Prefs::PrefsCache]] The PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values: * {locals} Contains all locals at this level. Locals are values that only apply when the current topic is the topic where the local is defined. The variable names are decorated with the locality where they apply. * {values} contains all sets, locals, and all values inherited from the parent level As each cache level is built, the values are copied down from the parent cache level. This sounds monstrously inefficient, but in fact perl does this a lot better than doing a multi-level lookup when a value is referenced. This is especially important when many prefs lookups may be done in a session, for example when searching. This package doesn't smell ---++ [[TWikiQueryHoistREsDotPm][TWiki::Query::HoistREs]] Static functions to extract regular expressions from queries. The REs can be used in caching stores that use the TWiki standard inline meta-data representation to pre-filter topic lists for more efficient query matching. See =Store/RcsFile.pm= for an example of usage. This package doesn't smell ---++ [[TWikiQueryNodeDotPm][TWiki::Query]] A Query object is a representation of a query over the TWiki database. Fields are given by name, and values by strings or numbers. Strings should always be surrounded by 'single-quotes'. Numbers can be signed integers or decimals. Single quotes in values may be escaped using backslash (\). See TWiki.QuerySearch for details of the query language. At the time of writing only a subset of the entire query language is supported, for use in searching. A query object implements the =evaluate= method as its general contract with the rest of the world. This method does a "hard work" evaluation of the parser tree. Of course, smarter Store implementations should be able to do it better.... This package has smell factor of *2* ---++ [[TWikiQueryParserDotPm][TWiki::Query::Parser]] Parser for queries This package doesn't smell ---++ [[TWikiRenderDotPm][TWiki::Render]] This module provides most of the actual HTML rendering code in TWiki. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 21 | |||||||
> > | This package has smell factor of 22 | |||||||
Added: | ||||||||
> > | [[TWikiRequestDotPm][]]This package has smell factor of 1[[TWikiResponseDotPm][]]This package doesn't smell | |||||||
TWiki::SandboxThis object provides an interface to the outside world. All calls to system functions, or handling of file names, should be brokered by this object. NOTE: TWiki creates a singleton sandbox that is shared by all TWiki runs under a single mod_perl instance. If any TWiki run modifies the sandbox, that modification will carry over in to subsequent runs. Be very, very careful! This package has smell factor of 4TWiki::SearchThis module implements all the search functionality. This package has smell factor of 13TWiki::StoreThis module hosts the generic storage backend. This module provides the interface layer between the "real" store provider - which is hidden behind a handler - and the rest of the system. it is responsible for checking for topic existance, access permissions, and all the other general admin tasks that are common to all store implementations. This module knows nothing about how the data is actually stored - that knowledge is entirely encapsulated in the handlers. The general contract for methods in the class requires that errors are signalled using exceptions. TWiki::AccessControlException is used for access control exceptions, and Error::Simple for all other types of error. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 14 | |||||||
> > | This package has smell factor of 15 | |||||||
TWiki::Store::QueryAlgorithms::BruteForceDefault brute-force query algorithm Has some basic optimisation: it hoists regular expressions out of the query to use with grep, so we can narrow down the set of topics that we have to evaluate the query on. Not sure exactly where the breakpoint is between the costs of hoisting and the advantages of hoisting. Benchmarks suggest that it's around 6 topics, though this may vary depending on disk speed and memory size. It also depends on the complexity of the query. This package doesn't smellTWiki::Store::RcsFileThis class is PACKAGE PRIVATE to Store, and should never be used from anywhere else. It is the base class of implementations of stores that manipulate RCS format files. The general contract of the methods on this class and its subclasses calls for errors to be signalled by Error::Simple exceptions. Refer to Store.pm for models of usage. This package has smell factor of 11TWiki::Store::RcsLiteThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Simple replacement for RCS. Doesn't support:
File formatrcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num }* sym ::= {digit}* idchar {idchar | digit }* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | :Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use. Revisions consist of a sequence of 'a' and 'd' edits that need to be applied to rev N+1 to get rev N. Each edit has an offset (number of lines from start) and length (number of lines). For 'a', the edit is followed by length lines (the lines to be inserted in the text). For example: d1 3 means "delete three lines starting with line 1 a4 2 means "insert two lines at line 4' xxxxxx is the new line 4 yyyyyy is the new line 5 This package has smell factor of 2 TWiki::Store::RcsWrapThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Wrapper around the RCS commands required by TWiki. There is one of these object for each file stored under RCS. This package has smell factor of 3TWiki::Store::SearchAlgorithms::ForkingForking implementation of the RCS cache search.search($searchString, $topics, $options, $sDir) -> \%seenSearch .txt files in $dir for $searchString. See RcsFile::searchInWebContent for details. This package has smell factor of 3TWiki::Store::SearchAlgorithms::PurePerlPure perl implementation of the RCS cache search.search($searchString, $topics, $options, $sDir) -> \%seenSearch .txt files in $dir for $string. See RcsFile::searchInWebContent for details. This package doesn't smellTWiki::TemplatesSupport for the TWiki template language. This package has smell factor of 2TWiki::TimeTime handling functions. This package has smell factor of 7TWiki::UI::ChangeFormService functions used by the UI packages This package doesn't smell | ||||||||
Changed: | ||||||||
< < | TWiki::UI | |||||||
> > | [[TWikiUIDotPm][]] | |||||||
Deleted: | ||||||||
< < | Service functions used by the UI packages | |||||||
Deleted: | ||||||||
< < | ||||||||
This package doesn't smell
TWiki::UI::EditEdit command handler This package has smell factor of 1TWiki::UI::ManageUI functions for web, topic and user management This package has smell factor of 4TWiki::UI::OopsUI delegate for oops function This package doesn't smellTWiki::UI::RDiffUI functions for diffing. This package has smell factor of 12TWiki::UI::RegisterUser registration handling. This package has smell factor of 8 | ||||||||
Added: | ||||||||
> > | TWiki::UI::RestUI delegate for REST interface This package has smell factor of 1 | |||||||
TWiki::UI::SaveUI delegate for save function This package has smell factor of 1TWiki::UI::SearchUI functions for searching. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 2 | |||||||
> > | This package has smell factor of 3 | |||||||
TWiki::UI::StatisticsStatistics extraction and presentation This package has smell factor of 4TWiki::UI::UploadUI delegate for attachment management functions | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 3 | |||||||
> > | This package has smell factor of 2 | |||||||
TWiki::UI::ViewUI delegate for view function | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 2 | |||||||
> > | This package has smell factor of 3 | |||||||
TWiki::UserMappingThis is a virtual base class (a.k.a an interface) for all user mappers. It is not useable as a mapping in TWiki - use the BaseUserMapping for default behaviour. User mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. See TWiki::Users::BaseUserMapping and TWiki::Users::TWikiUserMapping for the default implementations of this interface. If you want to write a user mapper, you will need to implement the methods described in this class. User mappings work by mapping both login names and display names to a canonical user id. This user id is composed from a prefix that defines the mapper in use (something like 'BaseUserMapping_' or 'LdapUserMapping_') and a unique user id that the mapper uses to identify the user. The null prefix is reserver for the TWikiUserMapping for compatibility with old TWiki releases. Note: in all the following documentation,$cUID refers to a
canonical user id.
This package has smell factor of 1
TWiki::Users::ApacheHtpasswdUserPassword manager that uses Apache::HtPasswd to manage users and passwords. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
Duplicates functionality of
=TWiki::Users::HtPasswdUser=;
provided mainly as an example of how to write a new password manager.
This package has smell factor of 1
TWiki::Users::BaseUserMappingUser mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. The BaseMapper provides support for a small number of predefined users. No registration - this is a read only usermapper. It uses the mapper prefix 'BaseUserMapping_'.Users
Groups
TWiki::UsersThis package provides services for the lookup and manipulation of login and wiki names of users, and their authentication. It is a Facade that presents a common interface to the User Mapping and Password modules. The rest of the core should only use the methods of this package, and should never call the mapping or password managers directly. TWiki uses the concept of a login name which is used to authenticate a user. A login name maps to a wiki name that is used to identify the user for display. Each login name is unique to a single user, though several login names may map to the same wiki name. Using this module (and the associated plug-in user mapper) TWiki supports the concept of groups. Groups are sets of login names that are treated equally for the purposes of access control. Group names do not have to be wiki names, though it is helpful for display if they are. Internally in the code TWiki uses something referred to as a _canonical user id_ or just user id. The user id is also used externally to uniquely identify the user when (for example) recording topic histories. The user id is usually just the login name, but it doesn't need to be. It just has to be a unique 7-bit alphanumeric and underscore string that can be mapped to/from login and wiki names by the user mapper. The canonical user id should never be seen by a user. On the other hand, core code should never use anything but a canonical user id to refer to a user. Terminology
TWiki::Users::HtPasswdUserSupport for htpasswd and htdigest format password files. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
This package has smell factor of 3
TWiki::Users::PasswordBase class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like. The methods of this class should be overridded by subclasses that want to implement other password handling methods. This package doesn't smell | ||||||||
Changed: | ||||||||
< < | There were a total of 198 smells | |||||||
> > | There were a total of 206 smells | |||||||
TWiki Source Code Packages![]() pod , so it always matches the running code
On this page:
[[CGISessionDotPm][]]This package doesn't smell[[CGISessionDriverDBIDotPm][]]This package doesn't smell[[CGISessionDriverDb_fileDotPm][]]This package doesn't smell[[CGISessionDriverDotPm][]]This package doesn't smell[[CGISessionDriverFileDotPm][]]This package doesn't smell[[CGISessionDriverMysqlDotPm][]]This package doesn't smell[[CGISessionDriverPostgresqlDotPm][]]This package doesn't smell[[CGISessionDriverSqliteDotPm][]]This package doesn't smell[[CGISessionErrorHandlerDotPm][]]This package doesn't smell[[CGISessionIDIncrDotPm][]]This package doesn't smell[[CGISessionIDMd5DotPm][]]This package doesn't smell[[CGISessionSerializeDefaultDotPm][]]This package doesn't smell[[CGISessionSerializeFreezethawDotPm][]]This package doesn't smell[[CGISessionSerializeJsonDotPm][]]This package doesn't smell[[CGISessionSerializeStorableDotPm][]]This package doesn't smell[[CGISessionSerializeYamlDotPm][]]This package doesn't smell[[CGISessionTutorialDotPm][]]This package doesn't smell[[MonitorDotPm][]]This package doesn't smellTWiki::AccessControlExceptionException used raise an access control violation. This exception has the following fields:
TWiki::AccessA singleton object of this class manages the access control database. This package doesn't smellTWiki::AggregateIteratorcombine multiple iterators This package doesn't smellTWiki::AttachA singleton object of this class is used to deal with attachments to topics. This package doesn't smellTWiki::AttrsClass of attribute sets, designed for parsing and storing attribute values from a TWiki tag e.g.%TAG{"joe" fred="bad" joe="mad"}%
An attribute set is a hash containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the hash.
Attributes declared later in the string will override those of the same
name defined earlier. The one exception to this is the _DEFAULT key, where
the first instance is always taken.
As well as the default TWiki syntax (parameter values double-quoted)
this class also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values.
The extended syntax has to be enabled by passing the $friendly parameter
to new .
This package doesn't smell
TWiki::CompatibilitySupport for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed. This package has smell factor of 2TWiki::Configure::LoadPurposeThis module consists of just a single subroutinereadConfig . It allows to
safely modify configuration variables for one single run without affecting
normal TWiki operation.
This package doesn't smell
[[TWikiConfigureUIsEXTENDDotPm][]]This package has smell factor of 2TWikiTWiki operates by creating a singleton object (known as the Session object) that acts as a point of reference for all the different modules in the system. This package is the class for this singleton, and also contains the vast bulk of the basic constants and the per- site configuration mechanisms. Global variables are avoided wherever possible to avoid problems with CGI accelerators such as mod_perl.Public Data members
TWiki::FormObject representing a single form definition. Form definitions are mainly used to control rendering of a form for editing, though there is some application login there that handles transferring values between edits and saves. A form definition consists of a TWiki::Form object, which has a list of field definitions. Each field definition is an object of a type derived from TWiki::Form::FieldDefinition. These objects are responsible for the actual syntax and semantics of the field type. Form definitions are parsed from TWiki tables, and the types are mapped by name to a class declared in TWiki::Form::* - for example, thetext type is mapped
to TWiki::Form::Text and the checkbox type to TWiki::Form::Checkbox .
The TWiki::Form::FieldDefinition class declares default behaviours for
types that accept a single value in their definitions. The
TWiki::Form::ListFieldDefinition extends this for types that have lists
of possible values.
This package has smell factor of 4
TWiki::Form::FieldDefinitionBase class of all field definition classes. Type-specific classes are derived from this class to define specific per-type behaviours. This class also provides default behaviours for when a specific type cannot be loaded. This package doesn't smellTWiki::Form::ListFieldDefinitionForm field definitions that accept lists of values in the field definition. This is different to being multi-valued, which means the field type can store multiple values. This package has smell factor of 1[[TWikiFormSelectDotPm][]]This package doesn't smellTWiki::Func<-- STARTINCLUDE required for huge TWikiDocumentation topic -->Official list of stable TWiki functions for Plugin developers This module defines official functions that Plugins can use to interact with the TWiki engine and content. Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template Plugin and documentation on how to write a Plugin. Plugins should only use functions published in this module. If you use functions in other TWiki libraries you might create a security hole and you will probably need to change your Plugin when you upgrade TWiki. Deprecated functions will still work in older code, though they should not be called in new Plugins and should be replaced in older Plugins as soon as possible. The version of the TWiki::Func module is defined by the VERSION number of the TWiki::Plugins module, currently 6.10. This can be shown by the %PLUGINVERSION% TWiki variable, and accessed in code using
$TWiki::Plugins::VERSION . The 'Since' field in the function
documentation refers to $TWiki::Plugins::VERSION .
Notes on use of $TWiki::Plugins::VERSION (from 1.2 forwards):
TWiki::I18NSupport for strings translation and language detection. This package has smell factor of 2TWiki::I18N::ExtractSupport translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon). This package has smell factor of 1TWiki::If::NodeNode class for the result of an If statement parse This package doesn't smellTWiki::If::OP_iswebThis package doesn't smellTWiki::If::ParserSupport for the conditions in %IF{} statements. This package doesn't smellTWiki::Infix::ErrorClass of errors used with TWiki::Infix::Parser This package doesn't smellTWiki::Infix::NodeBase class for node types generated by Infix::Parser. You don't have to use it, but it may be useful. This package doesn't smellTWiki::Infix::ParserA simple stack-based parser that parses infix expressions with nonary, unary and binary operators specified using an operator table. Escapes are supported in strings, using backslash. This package doesn't smellTWiki::LineIteratorIterator over the lines in a file This package doesn't smellTWiki::ListIteratorIterator over a list This package doesn't smellTWiki::LoginManager::ApacheLoginThis is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g.,viewauth -> view , editauth -> edit , and so on.
See also TWikiUserAuthentication.
Subclass of TWiki::LoginManager; see that class for documentation of the
methods of this class.
This package has smell factor of 1
TWiki::LoginManagerThe package is also a Factory for login managers and also the base class for all login managers. On it's own, an object of this class is used when you specify 'none' in the security setup section of configure. When it is used, logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class. If you are building a new login manager, then you should write a new subclass of this class, implementing the methods marked as VIRTUAL. There are already examples in thelib/TWiki/LoginManager directory.
The class has extensive tracing, which is enabled by
$TWiki::cfg{Trace}{LoginManager.pm}. The tracing is done in such a way as to
let the perl optimiser optimise out the trace function as a no-op if tracing
is disabled.
Here's an overview of how it works:
Early in TWiki::new, the login manager is created. The creation of the login manager does two things:
ObjectData =twikiThe TWiki object this login manager is attached to. This package has smell factor of 7TWiki::LoginManager::TemplateLoginThis is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. Subclass of TWiki::LoginManager; see that class for documentation of the methods of this class. This package has smell factor of 2TWiki::MergeSupport for merging strings This package has smell factor of 1TWiki::MetaAll TWiki topics have data (text) and meta-data (information about the topic). Meta-data includes information such as file attachments, form fields, topic parentage etc. When TWiki loads a topic from the store, it represents the meta-data in the topic using an object of this class. A meta-data object is a hash of different types of meta-data (keyed on the type, such as 'FIELD' and 'TOPICINFO'). Each entry in the hash is an array, where each entry in the array contains another hash of the key=value pairs, corresponding to a single meta-datum. If there may be multiple entries of the same top-level type (i.e. for FIELD and FILEATTACHMENT) then the array has multiple entries. These types are referred to as "keyed" types. The array entries are keyed with the attribute 'name' which must be in each entry in the array. For unkeyed types, the array has only one entry. Pictorially,
TWiki::NetObject that brokers access to network resources. This package has smell factor of 3TWiki::Net::HTTPResponseFakeup of HTTP::Response for use when LWP is not available. Only implements a small subset of the HTTP::Response methods:
TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires
the name of an oops template file from the templates directory.
This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
Plugins may throw TWiki::OopsException. For example:
use Error; ... throw TWiki::OopsException( 'bathplugin', def => 'toestuck', web => $web, topic => $topic, params => [ 'bigtoe', 'hot tap' ] ); This package doesn't smell ---++ [[TWikiPluginDotPm][]] This package has smell factor of *2* ---++ [[TWikiPluginsDotPm][TWiki::Plugins]] This module defines the singleton object that handles Plugins loading, initialization and execution. This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins. This package doesn't smell ---++ [[TWikiPluralsDotPm][TWiki::Plurals]] Handle conversion of plural topic names to singular form. This package doesn't smell ---++ [[TWikiPrefsDotPm][TWiki::Prefs]] The Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these. Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier. The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!) This package doesn't smell ---++ [[TWikiPrefsParserDotPm][TWiki::Prefs::Parser]] This Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics. This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in. This package has smell factor of *1* ---++ [[TWikiPrefsPrefsCacheDotPm][TWiki::Prefs::PrefsCache]] The PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values: * {locals} Contains all locals at this level. Locals are values that only apply when the current topic is the topic where the local is defined. The variable names are decorated with the locality where they apply. * {values} contains all sets, locals, and all values inherited from the parent level As each cache level is built, the values are copied down from the parent cache level. This sounds monstrously inefficient, but in fact perl does this a lot better than doing a multi-level lookup when a value is referenced. This is especially important when many prefs lookups may be done in a session, for example when searching. This package doesn't smell ---++ [[TWikiQueryHoistREsDotPm][TWiki::Query::HoistREs]] Static functions to extract regular expressions from queries. The REs can be used in caching stores that use the TWiki standard inline meta-data representation to pre-filter topic lists for more efficient query matching. See =Store/RcsFile.pm= for an example of usage. This package doesn't smell ---++ [[TWikiQueryNodeDotPm][TWiki::Query]] A Query object is a representation of a query over the TWiki database. Fields are given by name, and values by strings or numbers. Strings should always be surrounded by 'single-quotes'. Numbers can be signed integers or decimals. Single quotes in values may be escaped using backslash (\). See TWiki.QuerySearch for details of the query language. At the time of writing only a subset of the entire query language is supported, for use in searching. A query object implements the =evaluate= method as its general contract with the rest of the world. This method does a "hard work" evaluation of the parser tree. Of course, smarter Store implementations should be able to do it better.... This package has smell factor of *2* ---++ [[TWikiQueryParserDotPm][TWiki::Query::Parser]] Parser for queries This package doesn't smell ---++ [[TWikiRenderDotPm][TWiki::Render]] This module provides most of the actual HTML rendering code in TWiki. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 22 | |||||||
> > | This package has smell factor of 21 | |||||||
TWiki::SandboxThis object provides an interface to the outside world. All calls to system functions, or handling of file names, should be brokered by this object. NOTE: TWiki creates a singleton sandbox that is shared by all TWiki runs under a single mod_perl instance. If any TWiki run modifies the sandbox, that modification will carry over in to subsequent runs. Be very, very careful! This package has smell factor of 4TWiki::SearchThis module implements all the search functionality. This package has smell factor of 13TWiki::StoreThis module hosts the generic storage backend. This module provides the interface layer between the "real" store provider - which is hidden behind a handler - and the rest of the system. it is responsible for checking for topic existance, access permissions, and all the other general admin tasks that are common to all store implementations. This module knows nothing about how the data is actually stored - that knowledge is entirely encapsulated in the handlers. The general contract for methods in the class requires that errors are signalled using exceptions. TWiki::AccessControlException is used for access control exceptions, and Error::Simple for all other types of error. This package has smell factor of 14TWiki::Store::QueryAlgorithms::BruteForceDefault brute-force query algorithm Has some basic optimisation: it hoists regular expressions out of the query to use with grep, so we can narrow down the set of topics that we have to evaluate the query on. Not sure exactly where the breakpoint is between the costs of hoisting and the advantages of hoisting. Benchmarks suggest that it's around 6 topics, though this may vary depending on disk speed and memory size. It also depends on the complexity of the query. This package doesn't smellTWiki::Store::RcsFileThis class is PACKAGE PRIVATE to Store, and should never be used from anywhere else. It is the base class of implementations of stores that manipulate RCS format files. The general contract of the methods on this class and its subclasses calls for errors to be signalled by Error::Simple exceptions. Refer to Store.pm for models of usage. This package has smell factor of 11TWiki::Store::RcsLiteThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Simple replacement for RCS. Doesn't support:
File formatrcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num }* sym ::= {digit}* idchar {idchar | digit }* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | :Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use. Revisions consist of a sequence of 'a' and 'd' edits that need to be applied to rev N+1 to get rev N. Each edit has an offset (number of lines from start) and length (number of lines). For 'a', the edit is followed by length lines (the lines to be inserted in the text). For example: d1 3 means "delete three lines starting with line 1 a4 2 means "insert two lines at line 4' xxxxxx is the new line 4 yyyyyy is the new line 5 This package has smell factor of 2 TWiki::Store::RcsWrapThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Wrapper around the RCS commands required by TWiki. There is one of these object for each file stored under RCS. This package has smell factor of 3TWiki::Store::SearchAlgorithms::ForkingForking implementation of the RCS cache search.search($searchString, $topics, $options, $sDir) -> \%seenSearch .txt files in $dir for $searchString. See RcsFile::searchInWebContent for details. This package has smell factor of 3TWiki::Store::SearchAlgorithms::PurePerlPure perl implementation of the RCS cache search.search($searchString, $topics, $options, $sDir) -> \%seenSearch .txt files in $dir for $string. See RcsFile::searchInWebContent for details. This package doesn't smellTWiki::TemplatesSupport for the TWiki template language. This package has smell factor of 2TWiki::TimeTime handling functions. This package has smell factor of 7TWiki::UI::ChangeFormService functions used by the UI packages This package doesn't smellTWiki::UIService functions used by the UI packages This package doesn't smellTWiki::UI::EditEdit command handler This package has smell factor of 1TWiki::UI::ManageUI functions for web, topic and user management This package has smell factor of 4TWiki::UI::OopsUI delegate for oops function This package doesn't smellTWiki::UI::RDiffUI functions for diffing. This package has smell factor of 12TWiki::UI::RegisterUser registration handling. This package has smell factor of 8TWiki::UI::SaveUI delegate for save function This package has smell factor of 1TWiki::UI::SearchUI functions for searching. This package has smell factor of 2TWiki::UI::StatisticsStatistics extraction and presentation This package has smell factor of 4TWiki::UI::UploadUI delegate for attachment management functions This package has smell factor of 3TWiki::UI::ViewUI delegate for view function This package has smell factor of 2TWiki::UserMappingThis is a virtual base class (a.k.a an interface) for all user mappers. It is not useable as a mapping in TWiki - use the BaseUserMapping for default behaviour. User mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. See TWiki::Users::BaseUserMapping and TWiki::Users::TWikiUserMapping for the default implementations of this interface. If you want to write a user mapper, you will need to implement the methods described in this class. User mappings work by mapping both login names and display names to a canonical user id. This user id is composed from a prefix that defines the mapper in use (something like 'BaseUserMapping_' or 'LdapUserMapping_') and a unique user id that the mapper uses to identify the user. The null prefix is reserver for the TWikiUserMapping for compatibility with old TWiki releases. Note: in all the following documentation,$cUID refers to a
canonical user id.
This package has smell factor of 1
TWiki::Users::ApacheHtpasswdUserPassword manager that uses Apache::HtPasswd to manage users and passwords. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
Duplicates functionality of
=TWiki::Users::HtPasswdUser=;
provided mainly as an example of how to write a new password manager.
This package has smell factor of 1
TWiki::Users::BaseUserMappingUser mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. The BaseMapper provides support for a small number of predefined users. No registration - this is a read only usermapper. It uses the mapper prefix 'BaseUserMapping_'.Users
Groups
TWiki::UsersThis package provides services for the lookup and manipulation of login and wiki names of users, and their authentication. It is a Facade that presents a common interface to the User Mapping and Password modules. The rest of the core should only use the methods of this package, and should never call the mapping or password managers directly. TWiki uses the concept of a login name which is used to authenticate a user. A login name maps to a wiki name that is used to identify the user for display. Each login name is unique to a single user, though several login names may map to the same wiki name. Using this module (and the associated plug-in user mapper) TWiki supports the concept of groups. Groups are sets of login names that are treated equally for the purposes of access control. Group names do not have to be wiki names, though it is helpful for display if they are. Internally in the code TWiki uses something referred to as a _canonical user id_ or just user id. The user id is also used externally to uniquely identify the user when (for example) recording topic histories. The user id is usually just the login name, but it doesn't need to be. It just has to be a unique 7-bit alphanumeric and underscore string that can be mapped to/from login and wiki names by the user mapper. The canonical user id should never be seen by a user. On the other hand, core code should never use anything but a canonical user id to refer to a user. Terminology
TWiki::Users::HtPasswdUserSupport for htpasswd and htdigest format password files. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
This package has smell factor of 3
TWiki::Users::PasswordBase class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like. The methods of this class should be overridded by subclasses that want to implement other password handling methods. This package doesn't smell | ||||||||
Changed: | ||||||||
< < | There were a total of 199 smells | |||||||
> > | There were a total of 198 smells | |||||||
TWiki Source Code Packages![]() pod , so it always matches the running code
On this page:
[[CGISessionDotPm][]]This package doesn't smell[[CGISessionDriverDBIDotPm][]]This package doesn't smell[[CGISessionDriverDb_fileDotPm][]]This package doesn't smell[[CGISessionDriverDotPm][]]This package doesn't smell[[CGISessionDriverFileDotPm][]]This package doesn't smell[[CGISessionDriverMysqlDotPm][]]This package doesn't smell[[CGISessionDriverPostgresqlDotPm][]]This package doesn't smell[[CGISessionDriverSqliteDotPm][]]This package doesn't smell[[CGISessionErrorHandlerDotPm][]]This package doesn't smell[[CGISessionIDIncrDotPm][]]This package doesn't smell[[CGISessionIDMd5DotPm][]]This package doesn't smell[[CGISessionSerializeDefaultDotPm][]]This package doesn't smell[[CGISessionSerializeFreezethawDotPm][]]This package doesn't smell[[CGISessionSerializeJsonDotPm][]]This package doesn't smell[[CGISessionSerializeStorableDotPm][]]This package doesn't smell[[CGISessionSerializeYamlDotPm][]]This package doesn't smell[[CGISessionTutorialDotPm][]]This package doesn't smell[[MonitorDotPm][]]This package doesn't smellTWiki::AccessControlExceptionException used raise an access control violation. This exception has the following fields:
TWiki::AccessA singleton object of this class manages the access control database. This package doesn't smellTWiki::AggregateIteratorcombine multiple iterators This package doesn't smellTWiki::AttachA singleton object of this class is used to deal with attachments to topics. This package doesn't smellTWiki::AttrsClass of attribute sets, designed for parsing and storing attribute values from a TWiki tag e.g.%TAG{"joe" fred="bad" joe="mad"}%
An attribute set is a hash containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the hash.
Attributes declared later in the string will override those of the same
name defined earlier. The one exception to this is the _DEFAULT key, where
the first instance is always taken.
As well as the default TWiki syntax (parameter values double-quoted)
this class also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values.
The extended syntax has to be enabled by passing the $friendly parameter
to new .
This package doesn't smell
TWiki::CompatibilitySupport for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed. This package has smell factor of 2TWiki::Configure::LoadPurposeThis module consists of just a single subroutinereadConfig . It allows to
safely modify configuration variables for one single run without affecting
normal TWiki operation.
This package doesn't smell
[[TWikiConfigureUIsEXTENDDotPm][]]This package has smell factor of 2TWikiTWiki operates by creating a singleton object (known as the Session object) that acts as a point of reference for all the different modules in the system. This package is the class for this singleton, and also contains the vast bulk of the basic constants and the per- site configuration mechanisms. Global variables are avoided wherever possible to avoid problems with CGI accelerators such as mod_perl.Public Data members
TWiki::FormObject representing a single form definition. Form definitions are mainly used to control rendering of a form for editing, though there is some application login there that handles transferring values between edits and saves. A form definition consists of a TWiki::Form object, which has a list of field definitions. Each field definition is an object of a type derived from TWiki::Form::FieldDefinition. These objects are responsible for the actual syntax and semantics of the field type. Form definitions are parsed from TWiki tables, and the types are mapped by name to a class declared in TWiki::Form::* - for example, thetext type is mapped
to TWiki::Form::Text and the checkbox type to TWiki::Form::Checkbox .
The TWiki::Form::FieldDefinition class declares default behaviours for
types that accept a single value in their definitions. The
TWiki::Form::ListFieldDefinition extends this for types that have lists
of possible values.
This package has smell factor of 4
TWiki::Form::FieldDefinitionBase class of all field definition classes. Type-specific classes are derived from this class to define specific per-type behaviours. This class also provides default behaviours for when a specific type cannot be loaded. This package doesn't smellTWiki::Form::ListFieldDefinitionForm field definitions that accept lists of values in the field definition. This is different to being multi-valued, which means the field type can store multiple values. This package has smell factor of 1[[TWikiFormSelectDotPm][]]This package doesn't smellTWiki::Func<-- STARTINCLUDE required for huge TWikiDocumentation topic -->Official list of stable TWiki functions for Plugin developers This module defines official functions that Plugins can use to interact with the TWiki engine and content. Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template Plugin and documentation on how to write a Plugin. Plugins should only use functions published in this module. If you use functions in other TWiki libraries you might create a security hole and you will probably need to change your Plugin when you upgrade TWiki. Deprecated functions will still work in older code, though they should not be called in new Plugins and should be replaced in older Plugins as soon as possible. The version of the TWiki::Func module is defined by the VERSION number of the TWiki::Plugins module, currently 6.10. This can be shown by the %PLUGINVERSION% TWiki variable, and accessed in code using
$TWiki::Plugins::VERSION . The 'Since' field in the function
documentation refers to $TWiki::Plugins::VERSION .
Notes on use of $TWiki::Plugins::VERSION (from 1.2 forwards):
TWiki::I18NSupport for strings translation and language detection. This package has smell factor of 2TWiki::I18N::ExtractSupport translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon). This package has smell factor of 1TWiki::If::NodeNode class for the result of an If statement parse This package doesn't smellTWiki::If::OP_iswebThis package doesn't smellTWiki::If::ParserSupport for the conditions in %IF{} statements. This package doesn't smellTWiki::Infix::ErrorClass of errors used with TWiki::Infix::Parser This package doesn't smellTWiki::Infix::NodeBase class for node types generated by Infix::Parser. You don't have to use it, but it may be useful. This package doesn't smellTWiki::Infix::ParserA simple stack-based parser that parses infix expressions with nonary, unary and binary operators specified using an operator table. Escapes are supported in strings, using backslash. This package doesn't smellTWiki::LineIteratorIterator over the lines in a file This package doesn't smellTWiki::ListIteratorIterator over a list This package doesn't smellTWiki::LoginManager::ApacheLoginThis is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g.,viewauth -> view , editauth -> edit , and so on.
See also TWikiUserAuthentication.
Subclass of TWiki::LoginManager; see that class for documentation of the
methods of this class.
This package has smell factor of 1
TWiki::LoginManagerThe package is also a Factory for login managers and also the base class for all login managers. On it's own, an object of this class is used when you specify 'none' in the security setup section of configure. When it is used, logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class. If you are building a new login manager, then you should write a new subclass of this class, implementing the methods marked as VIRTUAL. There are already examples in thelib/TWiki/LoginManager directory.
The class has extensive tracing, which is enabled by
$TWiki::cfg{Trace}{LoginManager.pm}. The tracing is done in such a way as to
let the perl optimiser optimise out the trace function as a no-op if tracing
is disabled.
Here's an overview of how it works:
Early in TWiki::new, the login manager is created. The creation of the login manager does two things:
ObjectData =twikiThe TWiki object this login manager is attached to. This package has smell factor of 7TWiki::LoginManager::TemplateLoginThis is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. Subclass of TWiki::LoginManager; see that class for documentation of the methods of this class. This package has smell factor of 2TWiki::MergeSupport for merging strings This package has smell factor of 1TWiki::MetaAll TWiki topics have data (text) and meta-data (information about the topic). Meta-data includes information such as file attachments, form fields, topic parentage etc. When TWiki loads a topic from the store, it represents the meta-data in the topic using an object of this class. A meta-data object is a hash of different types of meta-data (keyed on the type, such as 'FIELD' and 'TOPICINFO'). Each entry in the hash is an array, where each entry in the array contains another hash of the key=value pairs, corresponding to a single meta-datum. If there may be multiple entries of the same top-level type (i.e. for FIELD and FILEATTACHMENT) then the array has multiple entries. These types are referred to as "keyed" types. The array entries are keyed with the attribute 'name' which must be in each entry in the array. For unkeyed types, the array has only one entry. Pictorially,
TWiki::NetObject that brokers access to network resources. This package has smell factor of 3TWiki::Net::HTTPResponseFakeup of HTTP::Response for use when LWP is not available. Only implements a small subset of the HTTP::Response methods:
TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires
the name of an oops template file from the templates directory.
This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
Plugins may throw TWiki::OopsException. For example:
use Error; ... throw TWiki::OopsException( 'bathplugin', def => 'toestuck', web => $web, topic => $topic, params => [ 'bigtoe', 'hot tap' ] ); This package doesn't smell ---++ [[TWikiPluginDotPm][]] This package has smell factor of *2* ---++ [[TWikiPluginsDotPm][TWiki::Plugins]] This module defines the singleton object that handles Plugins loading, initialization and execution. This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins. This package doesn't smell ---++ [[TWikiPluralsDotPm][TWiki::Plurals]] | ||||||||
Deleted: | ||||||||
< < | Handle conversion of plural topic names to singular form. | |||||||
Added: | ||||||||
> > | Handle conversion of plural topic names to singular form. | |||||||
Added: | ||||||||
> > | ||||||||
This package doesn't smell
TWiki::PrefsThe Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these. Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier. The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!) This package doesn't smellTWiki::Prefs::ParserThis Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics. This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in. This package has smell factor of 1TWiki::Prefs::PrefsCacheThe PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values:
TWiki::Query::HoistREsStatic functions to extract regular expressions from queries. The REs can be used in caching stores that use the TWiki standard inline meta-data representation to pre-filter topic lists for more efficient query matching. SeeStore/RcsFile.pm for an example of usage.
This package doesn't smell
TWiki::QueryA Query object is a representation of a query over the TWiki database. Fields are given by name, and values by strings or numbers. Strings should always be surrounded by 'single-quotes'. Numbers can be signed integers or decimals. Single quotes in values may be escaped using backslash (\). See QuerySearch for details of the query language. At the time of writing only a subset of the entire query language is supported, for use in searching. A query object implements theevaluate method as its general
contract with the rest of the world. This method does a "hard work" evaluation
of the parser tree. Of course, smarter Store implementations should be
able to do it better....
This package has smell factor of 2
TWiki::Query::ParserParser for queries This package doesn't smellTWiki::RenderThis module provides most of the actual HTML rendering code in TWiki. This package has smell factor of 22TWiki::SandboxThis object provides an interface to the outside world. All calls to system functions, or handling of file names, should be brokered by this object. NOTE: TWiki creates a singleton sandbox that is shared by all TWiki runs under a single mod_perl instance. If any TWiki run modifies the sandbox, that modification will carry over in to subsequent runs. Be very, very careful! This package has smell factor of 4TWiki::SearchThis module implements all the search functionality. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 14 | |||||||
> > | This package has smell factor of 13 | |||||||
TWiki::StoreThis module hosts the generic storage backend. This module provides the interface layer between the "real" store provider - which is hidden behind a handler - and the rest of the system. it is responsible for checking for topic existance, access permissions, and all the other general admin tasks that are common to all store implementations. This module knows nothing about how the data is actually stored - that knowledge is entirely encapsulated in the handlers. The general contract for methods in the class requires that errors are signalled using exceptions. TWiki::AccessControlException is used for access control exceptions, and Error::Simple for all other types of error. This package has smell factor of 14TWiki::Store::QueryAlgorithms::BruteForceDefault brute-force query algorithm Has some basic optimisation: it hoists regular expressions out of the query to use with grep, so we can narrow down the set of topics that we have to evaluate the query on. Not sure exactly where the breakpoint is between the costs of hoisting and the advantages of hoisting. Benchmarks suggest that it's around 6 topics, though this may vary depending on disk speed and memory size. It also depends on the complexity of the query. This package doesn't smellTWiki::Store::RcsFileThis class is PACKAGE PRIVATE to Store, and should never be used from anywhere else. It is the base class of implementations of stores that manipulate RCS format files. The general contract of the methods on this class and its subclasses calls for errors to be signalled by Error::Simple exceptions. Refer to Store.pm for models of usage. This package has smell factor of 11TWiki::Store::RcsLiteThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Simple replacement for RCS. Doesn't support:
File formatrcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num }* sym ::= {digit}* idchar {idchar | digit }* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | :Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use. Revisions consist of a sequence of 'a' and 'd' edits that need to be applied to rev N+1 to get rev N. Each edit has an offset (number of lines from start) and length (number of lines). For 'a', the edit is followed by length lines (the lines to be inserted in the text). For example: d1 3 means "delete three lines starting with line 1 a4 2 means "insert two lines at line 4' xxxxxx is the new line 4 yyyyyy is the new line 5 This package has smell factor of 2 TWiki::Store::RcsWrapThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Wrapper around the RCS commands required by TWiki. There is one of these object for each file stored under RCS. This package has smell factor of 3TWiki::Store::SearchAlgorithms::ForkingForking implementation of the RCS cache search.search($searchString, $topics, $options, $sDir) -> \%seenSearch .txt files in $dir for $searchString. See RcsFile::searchInWebContent for details. This package has smell factor of 3TWiki::Store::SearchAlgorithms::PurePerlPure perl implementation of the RCS cache search.search($searchString, $topics, $options, $sDir) -> \%seenSearch .txt files in $dir for $string. See RcsFile::searchInWebContent for details. This package doesn't smellTWiki::TemplatesSupport for the TWiki template language. This package has smell factor of 2TWiki::TimeTime handling functions. This package has smell factor of 7TWiki::UI::ChangeFormService functions used by the UI packages This package doesn't smellTWiki::UIService functions used by the UI packages This package doesn't smellTWiki::UI::EditEdit command handler This package has smell factor of 1TWiki::UI::ManageUI functions for web, topic and user management This package has smell factor of 4TWiki::UI::OopsUI delegate for oops function This package doesn't smellTWiki::UI::RDiffUI functions for diffing. This package has smell factor of 12TWiki::UI::RegisterUser registration handling. This package has smell factor of 8TWiki::UI::SaveUI delegate for save function This package has smell factor of 1TWiki::UI::SearchUI functions for searching. This package has smell factor of 2TWiki::UI::StatisticsStatistics extraction and presentation This package has smell factor of 4TWiki::UI::UploadUI delegate for attachment management functions This package has smell factor of 3TWiki::UI::ViewUI delegate for view function This package has smell factor of 2TWiki::UserMappingThis is a virtual base class (a.k.a an interface) for all user mappers. It is not useable as a mapping in TWiki - use the BaseUserMapping for default behaviour. User mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. See TWiki::Users::BaseUserMapping and TWiki::Users::TWikiUserMapping for the default implementations of this interface. If you want to write a user mapper, you will need to implement the methods described in this class. User mappings work by mapping both login names and display names to a canonical user id. This user id is composed from a prefix that defines the mapper in use (something like 'BaseUserMapping_' or 'LdapUserMapping_') and a unique user id that the mapper uses to identify the user. The null prefix is reserver for the TWikiUserMapping for compatibility with old TWiki releases. Note: in all the following documentation,$cUID refers to a
canonical user id.
This package has smell factor of 1
TWiki::Users::ApacheHtpasswdUserPassword manager that uses Apache::HtPasswd to manage users and passwords. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
Duplicates functionality of
=TWiki::Users::HtPasswdUser=;
provided mainly as an example of how to write a new password manager.
This package has smell factor of 1
TWiki::Users::BaseUserMappingUser mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. The BaseMapper provides support for a small number of predefined users. No registration - this is a read only usermapper. It uses the mapper prefix 'BaseUserMapping_'.Users
Groups
TWiki::UsersThis package provides services for the lookup and manipulation of login and wiki names of users, and their authentication. It is a Facade that presents a common interface to the User Mapping and Password modules. The rest of the core should only use the methods of this package, and should never call the mapping or password managers directly. TWiki uses the concept of a login name which is used to authenticate a user. A login name maps to a wiki name that is used to identify the user for display. Each login name is unique to a single user, though several login names may map to the same wiki name. Using this module (and the associated plug-in user mapper) TWiki supports the concept of groups. Groups are sets of login names that are treated equally for the purposes of access control. Group names do not have to be wiki names, though it is helpful for display if they are. Internally in the code TWiki uses something referred to as a _canonical user id_ or just user id. The user id is also used externally to uniquely identify the user when (for example) recording topic histories. The user id is usually just the login name, but it doesn't need to be. It just has to be a unique 7-bit alphanumeric and underscore string that can be mapped to/from login and wiki names by the user mapper. The canonical user id should never be seen by a user. On the other hand, core code should never use anything but a canonical user id to refer to a user. Terminology
TWiki::Users::HtPasswdUserSupport for htpasswd and htdigest format password files. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
This package has smell factor of 3
TWiki::Users::PasswordBase class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like. The methods of this class should be overridded by subclasses that want to implement other password handling methods. This package doesn't smell | ||||||||
Changed: | ||||||||
< < | There were a total of 200 smells | |||||||
> > | There were a total of 199 smells | |||||||
TWiki Source Code Packages![]() pod , so it always matches the running code
On this page:
[[CGISessionDotPm][]]This package doesn't smell[[CGISessionDriverDBIDotPm][]]This package doesn't smell[[CGISessionDriverDb_fileDotPm][]]This package doesn't smell[[CGISessionDriverDotPm][]]This package doesn't smell[[CGISessionDriverFileDotPm][]]This package doesn't smell[[CGISessionDriverMysqlDotPm][]]This package doesn't smell[[CGISessionDriverPostgresqlDotPm][]]This package doesn't smell[[CGISessionDriverSqliteDotPm][]]This package doesn't smell[[CGISessionErrorHandlerDotPm][]]This package doesn't smell[[CGISessionIDIncrDotPm][]]This package doesn't smell[[CGISessionIDMd5DotPm][]]This package doesn't smell[[CGISessionSerializeDefaultDotPm][]]This package doesn't smell[[CGISessionSerializeFreezethawDotPm][]]This package doesn't smell[[CGISessionSerializeJsonDotPm][]]This package doesn't smell[[CGISessionSerializeStorableDotPm][]]This package doesn't smell[[CGISessionSerializeYamlDotPm][]]This package doesn't smell[[CGISessionTutorialDotPm][]]This package doesn't smell[[MonitorDotPm][]]This package doesn't smellTWiki::AccessControlExceptionException used raise an access control violation. This exception has the following fields:
TWiki::AccessA singleton object of this class manages the access control database. This package doesn't smellTWiki::AggregateIteratorcombine multiple iterators This package doesn't smellTWiki::AttachA singleton object of this class is used to deal with attachments to topics. This package doesn't smellTWiki::AttrsClass of attribute sets, designed for parsing and storing attribute values from a TWiki tag e.g.%TAG{"joe" fred="bad" joe="mad"}%
An attribute set is a hash containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the hash.
Attributes declared later in the string will override those of the same
name defined earlier. The one exception to this is the _DEFAULT key, where
the first instance is always taken.
As well as the default TWiki syntax (parameter values double-quoted)
this class also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values.
The extended syntax has to be enabled by passing the $friendly parameter
to new .
This package doesn't smell
TWiki::CompatibilitySupport for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed. This package has smell factor of 2TWiki::Configure::LoadPurposeThis module consists of just a single subroutinereadConfig . It allows to
safely modify configuration variables for one single run without affecting
normal TWiki operation.
This package doesn't smell
[[TWikiConfigureUIsEXTENDDotPm][]] | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 1 | |||||||
> > | This package has smell factor of 2 | |||||||
TWikiTWiki operates by creating a singleton object (known as the Session object) that acts as a point of reference for all the different modules in the system. This package is the class for this singleton, and also contains the vast bulk of the basic constants and the per- site configuration mechanisms. Global variables are avoided wherever possible to avoid problems with CGI accelerators such as mod_perl.Public Data members
| ||||||||
Changed: | ||||||||
< < | This package has smell factor of 34 | |||||||
> > | This package has smell factor of 35 | |||||||
TWiki::FormObject representing a single form definition. Form definitions are mainly used to control rendering of a form for editing, though there is some application login there that handles transferring values between edits and saves. A form definition consists of a TWiki::Form object, which has a list of field definitions. Each field definition is an object of a type derived from TWiki::Form::FieldDefinition. These objects are responsible for the actual syntax and semantics of the field type. Form definitions are parsed from TWiki tables, and the types are mapped by name to a class declared in TWiki::Form::* - for example, thetext type is mapped
to TWiki::Form::Text and the checkbox type to TWiki::Form::Checkbox .
The TWiki::Form::FieldDefinition class declares default behaviours for
types that accept a single value in their definitions. The
TWiki::Form::ListFieldDefinition extends this for types that have lists
of possible values.
This package has smell factor of 4
TWiki::Form::FieldDefinitionBase class of all field definition classes. Type-specific classes are derived from this class to define specific per-type behaviours. This class also provides default behaviours for when a specific type cannot be loaded. This package doesn't smellTWiki::Form::ListFieldDefinitionForm field definitions that accept lists of values in the field definition. This is different to being multi-valued, which means the field type can store multiple values. This package has smell factor of 1[[TWikiFormSelectDotPm][]]This package doesn't smellTWiki::Func<-- STARTINCLUDE required for huge TWikiDocumentation topic -->Official list of stable TWiki functions for Plugin developers This module defines official functions that Plugins can use to interact with the TWiki engine and content. Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template Plugin and documentation on how to write a Plugin. Plugins should only use functions published in this module. If you use functions in other TWiki libraries you might create a security hole and you will probably need to change your Plugin when you upgrade TWiki. Deprecated functions will still work in older code, though they should not be called in new Plugins and should be replaced in older Plugins as soon as possible. The version of the TWiki::Func module is defined by the VERSION number of the TWiki::Plugins module, currently 6.10. This can be shown by the %PLUGINVERSION% TWiki variable, and accessed in code using
$TWiki::Plugins::VERSION . The 'Since' field in the function
documentation refers to $TWiki::Plugins::VERSION .
Notes on use of $TWiki::Plugins::VERSION (from 1.2 forwards):
TWiki::I18NSupport for strings translation and language detection. This package has smell factor of 2TWiki::I18N::ExtractSupport translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon). This package has smell factor of 1TWiki::If::NodeNode class for the result of an If statement parse This package doesn't smell | ||||||||
Added: | ||||||||
> > | TWiki::If::OP_iswebThis package doesn't smell | |||||||
TWiki::If::ParserSupport for the conditions in %IF{} statements. This package doesn't smellTWiki::Infix::ErrorClass of errors used with TWiki::Infix::Parser This package doesn't smellTWiki::Infix::NodeBase class for node types generated by Infix::Parser. You don't have to use it, but it may be useful. This package doesn't smellTWiki::Infix::ParserA simple stack-based parser that parses infix expressions with nonary, unary and binary operators specified using an operator table. Escapes are supported in strings, using backslash. This package doesn't smellTWiki::LineIteratorIterator over the lines in a file This package doesn't smellTWiki::ListIteratorIterator over a list This package doesn't smellTWiki::LoginManager::ApacheLoginThis is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g.,viewauth -> view , editauth -> edit , and so on.
See also TWikiUserAuthentication.
Subclass of TWiki::LoginManager; see that class for documentation of the
methods of this class.
This package has smell factor of 1
TWiki::LoginManagerThe package is also a Factory for login managers and also the base class for all login managers. On it's own, an object of this class is used when you specify 'none' in the security setup section of configure. When it is used, logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class. If you are building a new login manager, then you should write a new subclass of this class, implementing the methods marked as VIRTUAL. There are already examples in thelib/TWiki/LoginManager directory.
The class has extensive tracing, which is enabled by
$TWiki::cfg{Trace}{LoginManager.pm}. The tracing is done in such a way as to
let the perl optimiser optimise out the trace function as a no-op if tracing
is disabled.
Here's an overview of how it works:
Early in TWiki::new, the login manager is created. The creation of the login manager does two things:
ObjectData =twikiThe TWiki object this login manager is attached to. This package has smell factor of 7TWiki::LoginManager::TemplateLoginThis is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. Subclass of TWiki::LoginManager; see that class for documentation of the methods of this class. This package has smell factor of 2TWiki::MergeSupport for merging strings This package has smell factor of 1TWiki::MetaAll TWiki topics have data (text) and meta-data (information about the topic). Meta-data includes information such as file attachments, form fields, topic parentage etc. When TWiki loads a topic from the store, it represents the meta-data in the topic using an object of this class. A meta-data object is a hash of different types of meta-data (keyed on the type, such as 'FIELD' and 'TOPICINFO'). Each entry in the hash is an array, where each entry in the array contains another hash of the key=value pairs, corresponding to a single meta-datum. If there may be multiple entries of the same top-level type (i.e. for FIELD and FILEATTACHMENT) then the array has multiple entries. These types are referred to as "keyed" types. The array entries are keyed with the attribute 'name' which must be in each entry in the array. For unkeyed types, the array has only one entry. Pictorially,
TWiki::NetObject that brokers access to network resources. This package has smell factor of 3TWiki::Net::HTTPResponseFakeup of HTTP::Response for use when LWP is not available. Only implements a small subset of the HTTP::Response methods:
TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires
the name of an oops template file from the templates directory.
This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
Plugins may throw TWiki::OopsException. For example:
use Error; ... throw TWiki::OopsException( 'bathplugin', def => 'toestuck', web => $web, topic => $topic, params => [ 'bigtoe', 'hot tap' ] ); This package doesn't smell ---++ [[TWikiPluginDotPm][]] This package has smell factor of *2* ---++ [[TWikiPluginsDotPm][TWiki::Plugins]] This module defines the singleton object that handles Plugins loading, initialization and execution. This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins. This package doesn't smell ---++ [[TWikiPluralsDotPm][TWiki::Plurals]] Handle conversion of plural topic names to singular form. This package doesn't smell ---++ [[TWikiPrefsDotPm][TWiki::Prefs]] The Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these. Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier. The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!) This package doesn't smell ---++ [[TWikiPrefsParserDotPm][TWiki::Prefs::Parser]] This Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics. This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in. This package has smell factor of *1* ---++ [[TWikiPrefsPrefsCacheDotPm][TWiki::Prefs::PrefsCache]] The PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values: * {locals} Contains all locals at this level. Locals are values that only apply when the current topic is the topic where the local is defined. The variable names are decorated with the locality where they apply. * {values} contains all sets, locals, and all values inherited from the parent level As each cache level is built, the values are copied down from the parent cache level. This sounds monstrously inefficient, but in fact perl does this a lot better than doing a multi-level lookup when a value is referenced. This is especially important when many prefs lookups may be done in a session, for example when searching. This package doesn't smell ---++ [[TWikiQueryHoistREsDotPm][TWiki::Query::HoistREs]] Static functions to extract regular expressions from queries. The REs can be used in caching stores that use the TWiki standard inline meta-data representation to pre-filter topic lists for more efficient query matching. See =Store/RcsFile.pm= for an example of usage. This package doesn't smell ---++ [[TWikiQueryNodeDotPm][TWiki::Query]] A Query object is a representation of a query over the TWiki database. Fields are given by name, and values by strings or numbers. Strings should always be surrounded by 'single-quotes'. Numbers can be signed integers or decimals. Single quotes in values may be escaped using backslash (\). See TWiki.QuerySearch for details of the query language. At the time of writing only a subset of the entire query language is supported, for use in searching. A query object implements the =evaluate= method as its general contract with the rest of the world. This method does a "hard work" evaluation of the parser tree. Of course, smarter Store implementations should be able to do it better.... This package has smell factor of *2* ---++ [[TWikiQueryParserDotPm][TWiki::Query::Parser]] Parser for queries This package doesn't smell ---++ [[TWikiRenderDotPm][TWiki::Render]] This module provides most of the actual HTML rendering code in TWiki. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 20 | |||||||
> > | This package has smell factor of 22 | |||||||
TWiki::SandboxThis object provides an interface to the outside world. All calls to system functions, or handling of file names, should be brokered by this object. NOTE: TWiki creates a singleton sandbox that is shared by all TWiki runs under a single mod_perl instance. If any TWiki run modifies the sandbox, that modification will carry over in to subsequent runs. Be very, very careful! This package has smell factor of 4TWiki::SearchThis module implements all the search functionality. This package has smell factor of 14TWiki::StoreThis module hosts the generic storage backend. This module provides the interface layer between the "real" store provider - which is hidden behind a handler - and the rest of the system. it is responsible for checking for topic existance, access permissions, and all the other general admin tasks that are common to all store implementations. This module knows nothing about how the data is actually stored - that knowledge is entirely encapsulated in the handlers. The general contract for methods in the class requires that errors are signalled using exceptions. TWiki::AccessControlException is used for access control exceptions, and Error::Simple for all other types of error. This package has smell factor of 14TWiki::Store::QueryAlgorithms::BruteForceDefault brute-force query algorithm Has some basic optimisation: it hoists regular expressions out of the query to use with grep, so we can narrow down the set of topics that we have to evaluate the query on. Not sure exactly where the breakpoint is between the costs of hoisting and the advantages of hoisting. Benchmarks suggest that it's around 6 topics, though this may vary depending on disk speed and memory size. It also depends on the complexity of the query. This package doesn't smellTWiki::Store::RcsFileThis class is PACKAGE PRIVATE to Store, and should never be used from anywhere else. It is the base class of implementations of stores that manipulate RCS format files. The general contract of the methods on this class and its subclasses calls for errors to be signalled by Error::Simple exceptions. Refer to Store.pm for models of usage. This package has smell factor of 11TWiki::Store::RcsLiteThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Simple replacement for RCS. Doesn't support:
File formatrcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num }* sym ::= {digit}* idchar {idchar | digit }* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | :Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use. Revisions consist of a sequence of 'a' and 'd' edits that need to be applied to rev N+1 to get rev N. Each edit has an offset (number of lines from start) and length (number of lines). For 'a', the edit is followed by length lines (the lines to be inserted in the text). For example: d1 3 means "delete three lines starting with line 1 a4 2 means "insert two lines at line 4' xxxxxx is the new line 4 yyyyyy is the new line 5 This package has smell factor of 2 TWiki::Store::RcsWrapThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Wrapper around the RCS commands required by TWiki. There is one of these object for each file stored under RCS. This package has smell factor of 3TWiki::Store::SearchAlgorithms::ForkingForking implementation of the RCS cache search.search($searchString, $topics, $options, $sDir) -> \%seenSearch .txt files in $dir for $searchString. See RcsFile::searchInWebContent for details. This package has smell factor of 3TWiki::Store::SearchAlgorithms::PurePerlPure perl implementation of the RCS cache search.search($searchString, $topics, $options, $sDir) -> \%seenSearch .txt files in $dir for $string. See RcsFile::searchInWebContent for details. This package doesn't smellTWiki::TemplatesSupport for the TWiki template language. This package has smell factor of 2TWiki::TimeTime handling functions. This package has smell factor of 7TWiki::UI::ChangeFormService functions used by the UI packages This package doesn't smellTWiki::UIService functions used by the UI packages This package doesn't smellTWiki::UI::EditEdit command handler This package has smell factor of 1TWiki::UI::ManageUI functions for web, topic and user management This package has smell factor of 4TWiki::UI::OopsUI delegate for oops function This package doesn't smellTWiki::UI::RDiffUI functions for diffing. This package has smell factor of 12TWiki::UI::RegisterUser registration handling. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 5 | |||||||
> > | This package has smell factor of 8 | |||||||
TWiki::UI::SaveUI delegate for save function This package has smell factor of 1TWiki::UI::SearchUI functions for searching. This package has smell factor of 2TWiki::UI::StatisticsStatistics extraction and presentation This package has smell factor of 4TWiki::UI::UploadUI delegate for attachment management functions This package has smell factor of 3TWiki::UI::ViewUI delegate for view function This package has smell factor of 2TWiki::UserMappingThis is a virtual base class (a.k.a an interface) for all user mappers. It is not useable as a mapping in TWiki - use the BaseUserMapping for default behaviour. User mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. See TWiki::Users::BaseUserMapping and TWiki::Users::TWikiUserMapping for the default implementations of this interface. If you want to write a user mapper, you will need to implement the methods described in this class. User mappings work by mapping both login names and display names to a canonical user id. This user id is composed from a prefix that defines the mapper in use (something like 'BaseUserMapping_' or 'LdapUserMapping_') and a unique user id that the mapper uses to identify the user. The null prefix is reserver for the TWikiUserMapping for compatibility with old TWiki releases. Note: in all the following documentation,$cUID refers to a
canonical user id.
This package has smell factor of 1
TWiki::Users::ApacheHtpasswdUserPassword manager that uses Apache::HtPasswd to manage users and passwords. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
Duplicates functionality of
=TWiki::Users::HtPasswdUser=;
provided mainly as an example of how to write a new password manager.
This package has smell factor of 1
TWiki::Users::BaseUserMappingUser mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. The BaseMapper provides support for a small number of predefined users. No registration - this is a read only usermapper. It uses the mapper prefix 'BaseUserMapping_'.Users
Groups
TWiki::UsersThis package provides services for the lookup and manipulation of login and wiki names of users, and their authentication. It is a Facade that presents a common interface to the User Mapping and Password modules. The rest of the core should only use the methods of this package, and should never call the mapping or password managers directly. TWiki uses the concept of a login name which is used to authenticate a user. A login name maps to a wiki name that is used to identify the user for display. Each login name is unique to a single user, though several login names may map to the same wiki name. Using this module (and the associated plug-in user mapper) TWiki supports the concept of groups. Groups are sets of login names that are treated equally for the purposes of access control. Group names do not have to be wiki names, though it is helpful for display if they are. Internally in the code TWiki uses something referred to as a _canonical user id_ or just user id. The user id is also used externally to uniquely identify the user when (for example) recording topic histories. The user id is usually just the login name, but it doesn't need to be. It just has to be a unique 7-bit alphanumeric and underscore string that can be mapped to/from login and wiki names by the user mapper. The canonical user id should never be seen by a user. On the other hand, core code should never use anything but a canonical user id to refer to a user. Terminology
TWiki::Users::HtPasswdUserSupport for htpasswd and htdigest format password files. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
This package has smell factor of 3
TWiki::Users::PasswordBase class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like. The methods of this class should be overridded by subclasses that want to implement other password handling methods. This package doesn't smell | ||||||||
Changed: | ||||||||
< < | There were a total of 193 smells | |||||||
> > | There were a total of 200 smells | |||||||
TWiki Source Code Packages![]() pod , so it always matches the running code
On this page:
[[CGISessionDotPm][]]This package doesn't smell[[CGISessionDriverDBIDotPm][]]This package doesn't smell[[CGISessionDriverDb_fileDotPm][]]This package doesn't smell[[CGISessionDriverDotPm][]]This package doesn't smell[[CGISessionDriverFileDotPm][]]This package doesn't smell[[CGISessionDriverMysqlDotPm][]]This package doesn't smell[[CGISessionDriverPostgresqlDotPm][]]This package doesn't smell[[CGISessionDriverSqliteDotPm][]]This package doesn't smell[[CGISessionErrorHandlerDotPm][]]This package doesn't smell[[CGISessionIDIncrDotPm][]]This package doesn't smell[[CGISessionIDMd5DotPm][]]This package doesn't smell[[CGISessionSerializeDefaultDotPm][]]This package doesn't smell[[CGISessionSerializeFreezethawDotPm][]]This package doesn't smell[[CGISessionSerializeJsonDotPm][]]This package doesn't smell[[CGISessionSerializeStorableDotPm][]]This package doesn't smell[[CGISessionSerializeYamlDotPm][]]This package doesn't smell[[CGISessionTutorialDotPm][]]This package doesn't smell[[MonitorDotPm][]]This package doesn't smellTWiki::AccessControlExceptionException used raise an access control violation. This exception has the following fields:
TWiki::AccessA singleton object of this class manages the access control database. This package doesn't smellTWiki::AggregateIteratorcombine multiple iterators This package doesn't smellTWiki::AttachA singleton object of this class is used to deal with attachments to topics. This package doesn't smellTWiki::AttrsClass of attribute sets, designed for parsing and storing attribute values from a TWiki tag e.g.%TAG{"joe" fred="bad" joe="mad"}%
An attribute set is a hash containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the hash.
Attributes declared later in the string will override those of the same
name defined earlier. The one exception to this is the _DEFAULT key, where
the first instance is always taken.
As well as the default TWiki syntax (parameter values double-quoted)
this class also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values.
The extended syntax has to be enabled by passing the $friendly parameter
to new .
This package doesn't smell
TWiki::CompatibilitySupport for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed. This package has smell factor of 2TWiki::Configure::LoadPurposeThis module consists of just a single subroutinereadConfig . It allows to
safely modify configuration variables for one single run without affecting
normal TWiki operation.
This package doesn't smell
[[TWikiConfigureUIsEXTENDDotPm][]]This package has smell factor of 1TWikiTWiki operates by creating a singleton object (known as the Session object) that acts as a point of reference for all the different modules in the system. This package is the class for this singleton, and also contains the vast bulk of the basic constants and the per- site configuration mechanisms. Global variables are avoided wherever possible to avoid problems with CGI accelerators such as mod_perl.Public Data members
| ||||||||
Changed: | ||||||||
< < | This package has smell factor of 32 | |||||||
> > | This package has smell factor of 34 | |||||||
TWiki::FormObject representing a single form definition. Form definitions are mainly used to control rendering of a form for editing, though there is some application login there that handles transferring values between edits and saves. A form definition consists of a TWiki::Form object, which has a list of field definitions. Each field definition is an object of a type derived from TWiki::Form::FieldDefinition. These objects are responsible for the actual syntax and semantics of the field type. Form definitions are parsed from TWiki tables, and the types are mapped by name to a class declared in TWiki::Form::* - for example, thetext type is mapped
to TWiki::Form::Text and the checkbox type to TWiki::Form::Checkbox .
The TWiki::Form::FieldDefinition class declares default behaviours for
types that accept a single value in their definitions. The
TWiki::Form::ListFieldDefinition extends this for types that have lists
of possible values.
This package has smell factor of 4
TWiki::Form::FieldDefinitionBase class of all field definition classes. Type-specific classes are derived from this class to define specific per-type behaviours. This class also provides default behaviours for when a specific type cannot be loaded. This package doesn't smellTWiki::Form::ListFieldDefinitionForm field definitions that accept lists of values in the field definition. This is different to being multi-valued, which means the field type can store multiple values. This package has smell factor of 1[[TWikiFormSelectDotPm][]]This package doesn't smellTWiki::Func<-- STARTINCLUDE required for huge TWikiDocumentation topic -->Official list of stable TWiki functions for Plugin developers This module defines official functions that Plugins can use to interact with the TWiki engine and content. Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template Plugin and documentation on how to write a Plugin. Plugins should only use functions published in this module. If you use functions in other TWiki libraries you might create a security hole and you will probably need to change your Plugin when you upgrade TWiki. Deprecated functions will still work in older code, though they should not be called in new Plugins and should be replaced in older Plugins as soon as possible. The version of the TWiki::Func module is defined by the VERSION number of the TWiki::Plugins module, currently 6.10. This can be shown by the %PLUGINVERSION% TWiki variable, and accessed in code using
$TWiki::Plugins::VERSION . The 'Since' field in the function
documentation refers to $TWiki::Plugins::VERSION .
Notes on use of $TWiki::Plugins::VERSION (from 1.2 forwards):
TWiki::I18NSupport for strings translation and language detection. This package has smell factor of 2TWiki::I18N::ExtractSupport translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon). This package has smell factor of 1TWiki::If::NodeNode class for the result of an If statement parse This package doesn't smellTWiki::If::ParserSupport for the conditions in %IF{} statements. This package doesn't smellTWiki::Infix::ErrorClass of errors used with TWiki::Infix::Parser This package doesn't smellTWiki::Infix::NodeBase class for node types generated by Infix::Parser. You don't have to use it, but it may be useful. This package doesn't smellTWiki::Infix::ParserA simple stack-based parser that parses infix expressions with nonary, unary and binary operators specified using an operator table. Escapes are supported in strings, using backslash. This package doesn't smellTWiki::LineIteratorIterator over the lines in a file This package doesn't smellTWiki::ListIteratorIterator over a list This package doesn't smellTWiki::LoginManager::ApacheLoginThis is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g.,viewauth -> view , editauth -> edit , and so on.
See also TWikiUserAuthentication.
Subclass of TWiki::LoginManager; see that class for documentation of the
methods of this class.
This package has smell factor of 1
TWiki::LoginManagerThe package is also a Factory for login managers and also the base class for all login managers. On it's own, an object of this class is used when you specify 'none' in the security setup section of configure. When it is used, logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class. If you are building a new login manager, then you should write a new subclass of this class, implementing the methods marked as VIRTUAL. There are already examples in thelib/TWiki/LoginManager directory.
The class has extensive tracing, which is enabled by
$TWiki::cfg{Trace}{LoginManager.pm}. The tracing is done in such a way as to
let the perl optimiser optimise out the trace function as a no-op if tracing
is disabled.
Here's an overview of how it works:
Early in TWiki::new, the login manager is created. The creation of the login manager does two things:
ObjectData =twikiThe TWiki object this login manager is attached to. This package has smell factor of 7TWiki::LoginManager::TemplateLoginThis is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. Subclass of TWiki::LoginManager; see that class for documentation of the methods of this class. This package has smell factor of 2TWiki::MergeSupport for merging strings This package has smell factor of 1TWiki::MetaAll TWiki topics have data (text) and meta-data (information about the topic). Meta-data includes information such as file attachments, form fields, topic parentage etc. When TWiki loads a topic from the store, it represents the meta-data in the topic using an object of this class. A meta-data object is a hash of different types of meta-data (keyed on the type, such as 'FIELD' and 'TOPICINFO'). Each entry in the hash is an array, where each entry in the array contains another hash of the key=value pairs, corresponding to a single meta-datum. If there may be multiple entries of the same top-level type (i.e. for FIELD and FILEATTACHMENT) then the array has multiple entries. These types are referred to as "keyed" types. The array entries are keyed with the attribute 'name' which must be in each entry in the array. For unkeyed types, the array has only one entry. Pictorially,
TWiki::NetObject that brokers access to network resources. This package has smell factor of 3TWiki::Net::HTTPResponseFakeup of HTTP::Response for use when LWP is not available. Only implements a small subset of the HTTP::Response methods:
TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires
the name of an oops template file from the templates directory.
This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
Plugins may throw TWiki::OopsException. For example:
use Error; ... throw TWiki::OopsException( 'bathplugin', def => 'toestuck', web => $web, topic => $topic, params => [ 'bigtoe', 'hot tap' ] ); This package doesn't smell ---++ [[TWikiPluginDotPm][]] This package has smell factor of *2* ---++ [[TWikiPluginsDotPm][TWiki::Plugins]] This module defines the singleton object that handles Plugins loading, initialization and execution. This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins. This package doesn't smell ---++ [[TWikiPluralsDotPm][TWiki::Plurals]] Handle conversion of plural topic names to singular form. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 3 | |||||||
> > | This package doesn't smell | |||||||
TWiki::PrefsThe Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these. Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier. The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!) This package doesn't smellTWiki::Prefs::ParserThis Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics. This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in. This package has smell factor of 1TWiki::Prefs::PrefsCacheThe PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values:
TWiki::Query::HoistREsStatic functions to extract regular expressions from queries. The REs can be used in caching stores that use the TWiki standard inline meta-data representation to pre-filter topic lists for more efficient query matching. SeeStore/RcsFile.pm for an example of usage.
This package doesn't smell
TWiki::QueryA Query object is a representation of a query over the TWiki database. Fields are given by name, and values by strings or numbers. Strings should always be surrounded by 'single-quotes'. Numbers can be signed integers or decimals. Single quotes in values may be escaped using backslash (\). See QuerySearch for details of the query language. At the time of writing only a subset of the entire query language is supported, for use in searching. A query object implements theevaluate method as its general
contract with the rest of the world. This method does a "hard work" evaluation
of the parser tree. Of course, smarter Store implementations should be
able to do it better....
This package has smell factor of 2
TWiki::Query::ParserParser for queries This package doesn't smellTWiki::RenderThis module provides most of the actual HTML rendering code in TWiki. This package has smell factor of 20TWiki::SandboxThis object provides an interface to the outside world. All calls to system functions, or handling of file names, should be brokered by this object. NOTE: TWiki creates a singleton sandbox that is shared by all TWiki runs under a single mod_perl instance. If any TWiki run modifies the sandbox, that modification will carry over in to subsequent runs. Be very, very careful! This package has smell factor of 4TWiki::SearchThis module implements all the search functionality. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 15 | |||||||
> > | This package has smell factor of 14 | |||||||
TWiki::StoreThis module hosts the generic storage backend. This module provides the interface layer between the "real" store provider - which is hidden behind a handler - and the rest of the system. it is responsible for checking for topic existance, access permissions, and all the other general admin tasks that are common to all store implementations. This module knows nothing about how the data is actually stored - that knowledge is entirely encapsulated in the handlers. The general contract for methods in the class requires that errors are signalled using exceptions. TWiki::AccessControlException is used for access control exceptions, and Error::Simple for all other types of error. This package has smell factor of 14TWiki::Store::QueryAlgorithms::BruteForceDefault brute-force query algorithm Has some basic optimisation: it hoists regular expressions out of the query to use with grep, so we can narrow down the set of topics that we have to evaluate the query on. Not sure exactly where the breakpoint is between the costs of hoisting and the advantages of hoisting. Benchmarks suggest that it's around 6 topics, though this may vary depending on disk speed and memory size. It also depends on the complexity of the query. This package doesn't smellTWiki::Store::RcsFileThis class is PACKAGE PRIVATE to Store, and should never be used from anywhere else. It is the base class of implementations of stores that manipulate RCS format files. The general contract of the methods on this class and its subclasses calls for errors to be signalled by Error::Simple exceptions. Refer to Store.pm for models of usage. This package has smell factor of 11TWiki::Store::RcsLiteThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Simple replacement for RCS. Doesn't support:
File formatrcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num }* sym ::= {digit}* idchar {idchar | digit }* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | :Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use. Revisions consist of a sequence of 'a' and 'd' edits that need to be applied to rev N+1 to get rev N. Each edit has an offset (number of lines from start) and length (number of lines). For 'a', the edit is followed by length lines (the lines to be inserted in the text). For example: d1 3 means "delete three lines starting with line 1 a4 2 means "insert two lines at line 4' xxxxxx is the new line 4 yyyyyy is the new line 5 This package has smell factor of 2 TWiki::Store::RcsWrapThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Wrapper around the RCS commands required by TWiki. There is one of these object for each file stored under RCS. This package has smell factor of 3TWiki::Store::SearchAlgorithms::ForkingForking implementation of the RCS cache search.search($searchString, $topics, $options, $sDir) -> \%seenSearch .txt files in $dir for $searchString. See RcsFile::searchInWebContent for details. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 1 | |||||||
> > | This package has smell factor of 3 | |||||||
TWiki::Store::SearchAlgorithms::PurePerlPure perl implementation of the RCS cache search.search($searchString, $topics, $options, $sDir) -> \%seenSearch .txt files in $dir for $string. See RcsFile::searchInWebContent for details. This package doesn't smellTWiki::TemplatesSupport for the TWiki template language. This package has smell factor of 2TWiki::TimeTime handling functions. This package has smell factor of 7TWiki::UI::ChangeFormService functions used by the UI packages This package doesn't smellTWiki::UIService functions used by the UI packages This package doesn't smellTWiki::UI::EditEdit command handler This package has smell factor of 1TWiki::UI::ManageUI functions for web, topic and user management | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 5 | |||||||
> > | This package has smell factor of 4 | |||||||
TWiki::UI::OopsUI delegate for oops function This package doesn't smellTWiki::UI::RDiffUI functions for diffing. This package has smell factor of 12TWiki::UI::RegisterUser registration handling. This package has smell factor of 5TWiki::UI::SaveUI delegate for save function This package has smell factor of 1TWiki::UI::SearchUI functions for searching. This package has smell factor of 2TWiki::UI::StatisticsStatistics extraction and presentation This package has smell factor of 4TWiki::UI::UploadUI delegate for attachment management functions This package has smell factor of 3TWiki::UI::ViewUI delegate for view function This package has smell factor of 2TWiki::UserMappingThis is a virtual base class (a.k.a an interface) for all user mappers. It is not useable as a mapping in TWiki - use the BaseUserMapping for default behaviour. User mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. See TWiki::Users::BaseUserMapping and TWiki::Users::TWikiUserMapping for the default implementations of this interface. If you want to write a user mapper, you will need to implement the methods described in this class. User mappings work by mapping both login names and display names to a canonical user id. This user id is composed from a prefix that defines the mapper in use (something like 'BaseUserMapping_' or 'LdapUserMapping_') and a unique user id that the mapper uses to identify the user. The null prefix is reserver for the TWikiUserMapping for compatibility with old TWiki releases. | ||||||||
Changed: | ||||||||
< < | Note: in all the following documentation, $user refers to a | |||||||
> > | Note: in all the following documentation, $cUID refers to a | |||||||
canonical user id.
This package has smell factor of 1
TWiki::Users::ApacheHtpasswdUserPassword manager that uses Apache::HtPasswd to manage users and passwords. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
Duplicates functionality of
=TWiki::Users::HtPasswdUser=;
provided mainly as an example of how to write a new password manager.
This package has smell factor of 1 | ||||||||
Added: | ||||||||
> > | TWiki::Users::BaseUserMappingUser mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. The BaseMapper provides support for a small number of predefined users. No registration - this is a read only usermapper. It uses the mapper prefix 'BaseUserMapping_'.Users
Groups
| |||||||
TWiki::UsersThis package provides services for the lookup and manipulation of login and wiki names of users, and their authentication. It is a Facade that presents a common interface to the User Mapping and Password modules. The rest of the core should only use the methods of this package, and should never call the mapping or password managers directly. TWiki uses the concept of a login name which is used to authenticate a user. A login name maps to a wiki name that is used to identify the user for display. Each login name is unique to a single user, though several login names may map to the same wiki name. Using this module (and the associated plug-in user mapper) TWiki supports the concept of groups. Groups are sets of login names that are treated equally for the purposes of access control. Group names do not have to be wiki names, though it is helpful for display if they are. Internally in the code TWiki uses something referred to as a _canonical user id_ or just user id. The user id is also used externally to uniquely identify the user when (for example) recording topic histories. The user id is usually just the login name, but it doesn't need to be. It just has to be a unique 7-bit alphanumeric and underscore string that can be mapped to/from login and wiki names by the user mapper. The canonical user id should never be seen by a user. On the other hand, core code should never use anything but a canonical user id to refer to a user. Terminology
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
This package has smell factor of 5
TWiki::Users::HtPasswdUserSupport for htpasswd and htdigest format password files. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
This package has smell factor of 3
TWiki::Users::PasswordBase class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like. The methods of this class should be overridded by subclasses that want to implement other password handling methods. This package doesn't smell | ||||||||
Changed: | ||||||||
< < | There were a total of 192 smells | |||||||
> > | There were a total of 193 smells | |||||||
TWiki Source Code Packages![]() pod , so it always matches the running code
On this page:
| ||||||||
Changed: | ||||||||
< < | TWiki::AccessControlException | |||||||
> > | [[CGISessionDotPm][]] | |||||||
Deleted: | ||||||||
< < | Exception used raise an access control violation. | |||||||
Added: | ||||||||
> > | This package doesn't smell | |||||||
Added: | ||||||||
> > | [[CGISessionDriverDBIDotPm][]] | |||||||
Added: | ||||||||
> > | ||||||||
This package doesn't smell | ||||||||
Changed: | ||||||||
< < | TWiki::Access | |||||||
> > | [[CGISessionDriverDb_fileDotPm][]] | |||||||
Deleted: | ||||||||
< < | A singleton object of this class manages the access control database. | |||||||
Added: | ||||||||
> > | This package doesn't smell | |||||||
Added: | ||||||||
> > | [[CGISessionDriverDotPm][]] | |||||||
Added: | ||||||||
> > | ||||||||
This package doesn't smell | ||||||||
Changed: | ||||||||
< < | TWiki::Attach | |||||||
> > | [[CGISessionDriverFileDotPm][]] | |||||||
Deleted: | ||||||||
< < | A singleton object of this class is used to deal with attachments to topics. | |||||||
Added: | ||||||||
> > | This package doesn't smell | |||||||
Added: | ||||||||
> > | [[CGISessionDriverMysqlDotPm][]] | |||||||
Deleted: | ||||||||
< < | This package has smell factor of 1 | |||||||
Changed: | ||||||||
< < | TWiki::Attrs | |||||||
> > | This package doesn't smell | |||||||
Changed: | ||||||||
< < | Class of attribute sets, designed for parsing and storing attribute values | |||||||
> > | [[CGISessionDriverPostgresqlDotPm][]] | |||||||
Deleted: | ||||||||
< < | from a TWiki tag e.g. %TAG{fred='bad' "sad" joe="mad"}% | |||||||
Deleted: | ||||||||
< < | An attribute set is a map containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the map. | |||||||
Changed: | ||||||||
< < | Attributes declared later in the string will override those of the same | |||||||
> > | This package doesn't smell | |||||||
Deleted: | ||||||||
< < | name defined earlier. The one exception to this is the _DEFAULT key, where the first instance of a setting is always taken. | |||||||
Changed: | ||||||||
< < | As well as standard TWiki syntax (parameter values double-quoted) | |||||||
> > | [[CGISessionDriverSqliteDotPm][]] | |||||||
Deleted: | ||||||||
< < | it also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values,
though none of these alternatives is advertised in documentation and
the extended syntax can be turned off by passing the 'strict' parameter
to new . | |||||||
Deleted: | ||||||||
< < | This class replaces the old TWiki::extractNameValuePair and TWiki::extractParameters. | |||||||
Added: | ||||||||
> > | This package doesn't smell | |||||||
Added: | ||||||||
> > | [[CGISessionErrorHandlerDotPm][]] | |||||||
Added: | ||||||||
> > | ||||||||
This package doesn't smell | ||||||||
Changed: | ||||||||
< < | TWiki::Client::ApacheLogin | |||||||
> > | [[CGISessionIDIncrDotPm][]] | |||||||
Deleted: | ||||||||
< < | This is login manager that you can specify in the security setup section of
configure. It instructs TWiki to
cooperate with your web server (typically Apache) to require authentication
information (username & password) from users. It requires that you configure
your web server to demand authentication for scripts named "login" and anything
ending in "auth". The latter should be symlinks to existing scripts; e.g.,
viewauth -> view , editauth -> edit , and so on. | |||||||
Changed: | ||||||||
< < | See also TWikiUserAuthentication. | |||||||
> > | This package doesn't smell | |||||||
Changed: | ||||||||
< < | Subclass of TWiki::Client; see that class for documentation of the | |||||||
> > | [[CGISessionIDMd5DotPm][]] | |||||||
Deleted: | ||||||||
< < | methods of this class. | |||||||
Added: | ||||||||
> > | This package doesn't smell | |||||||
Added: | ||||||||
> > | [[CGISessionSerializeDefaultDotPm][]] | |||||||
This package doesn't smell | ||||||||
Changed: | ||||||||
< < | TWiki::Client | |||||||
> > | [[CGISessionSerializeFreezethawDotPm][]] | |||||||
Deleted: | ||||||||
< < | The package is also a Factory for login managers and also the base class for all login managers. | |||||||
Changed: | ||||||||
< < | On it's own, an object of this class is used when you specify 'none' in | |||||||
> > | This package doesn't smell | |||||||
Deleted: | ||||||||
< < | the security setup section of configure. When it is used, logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class. | |||||||
Changed: | ||||||||
< < | If you are building a new login manager, then you should write a new subclass | |||||||
> > | [[CGISessionSerializeJsonDotPm][]] | |||||||
Deleted: | ||||||||
< < | of this class, implementing the methods marked as VIRTUAL. There are already
examples in the lib/TWiki/Client directory. | |||||||
Deleted: | ||||||||
< < | The class has extensive tracing, which is enabled by $TWiki::cfg{Trace}{Client.pm}. The tracing is done in such a way as to let the perl optimiser optimise out the trace function as a no-op if tracing is disabled. | |||||||
Changed: | ||||||||
< < | Here's an overview of how it works: | |||||||
> > | This package doesn't smell | |||||||
Changed: | ||||||||
< < | Early in TWiki::new, the login manager is created. The creation of the login manager does two things: | |||||||
> > | [[CGISessionSerializeStorableDotPm][]] | |||||||
Deleted: | ||||||||
< < |
| |||||||
Deleted: | ||||||||
< < | Later again in TWiki::new, plugins are given a chance to override the username found from the loginManager. | |||||||
Changed: | ||||||||
< < | The last step in TWiki::new is to find the user, using whatever user mapping manager is in place. | |||||||
> > | This package doesn't smell | |||||||
Changed: | ||||||||
< < | ObjectData =twiki | |||||||
> > | [[CGISessionSerializeYamlDotPm][]] | |||||||
Deleted: | ||||||||
< < | The TWiki object this login manager is attached to. | |||||||
Added: | ||||||||
> > | This package doesn't smell | |||||||
Added: | ||||||||
> > | [[CGISessionTutorialDotPm][]] | |||||||
Deleted: | ||||||||
< < | This package has smell factor of 2 | |||||||
Changed: | ||||||||
< < | TWiki::Client::TemplateLogin | |||||||
> > | This package doesn't smell | |||||||
Changed: | ||||||||
< < | This is a login manager that you can specify in the security setup section of | |||||||
> > | [[MonitorDotPm][]] | |||||||
Deleted: | ||||||||
< < | configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. | |||||||
Deleted: | ||||||||
< < | Subclass of TWiki::Client; see that class for documentation of the methods of this class. | |||||||
Added: | ||||||||
> > | This package doesn't smell | |||||||
Added: | ||||||||
> > | TWiki::AccessControlException | |||||||
Changed: | ||||||||
< < | This package has smell factor of 1 | |||||||
> > | Exception used raise an access control violation. This exception has the | |||||||
Added: | ||||||||
> > | following fields:
| |||||||
Added: | ||||||||
> > | The exception may be thrown by plugins. If a plugin throws the exception, it
will normally be caught and the browser redirected to a login screen (if the
user is not logged in) or reported (if they are and just don't have access).
This package doesn't smell
TWiki::AccessA singleton object of this class manages the access control database. This package doesn't smellTWiki::AggregateIteratorcombine multiple iterators This package doesn't smellTWiki::AttachA singleton object of this class is used to deal with attachments to topics. This package doesn't smellTWiki::AttrsClass of attribute sets, designed for parsing and storing attribute values from a TWiki tag e.g.%TAG{"joe" fred="bad" joe="mad"}%
An attribute set is a hash containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the hash.
Attributes declared later in the string will override those of the same
name defined earlier. The one exception to this is the _DEFAULT key, where
the first instance is always taken.
As well as the default TWiki syntax (parameter values double-quoted)
this class also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values.
The extended syntax has to be enabled by passing the $friendly parameter
to new .
This package doesn't smell | |||||||
TWiki::CompatibilitySupport for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed. This package has smell factor of 2TWiki::Configure::LoadPurposeThis module consists of just a single subroutinereadConfig . It allows to
safely modify configuration variables for one single run without affecting
normal TWiki operation.
This package doesn't smell
[[TWikiConfigureUIsEXTENDDotPm][]]This package has smell factor of 1TWikiTWiki operates by creating a singleton object (known as the Session object) that acts as a point of reference for all the different modules in the system. This package is the class for this singleton, and also contains the vast bulk of the basic constants and the per- site configuration mechanisms. Global variables are avoided wherever possible to avoid problems with CGI accelerators such as mod_perl. | ||||||||
Added: | ||||||||
> > | Public Data members
| |||||||
Deleted: | ||||||||
< < | This package has smell factor of 25 | |||||||
Added: | ||||||||
> > | This package has smell factor of 32 | |||||||
TWiki::FormObject representing a single form definition. | ||||||||
Added: | ||||||||
> > | Form definitions are mainly used to control rendering of a form for editing, though there is some application login there that handles transferring values between edits and saves. | |||||||
Added: | ||||||||
> > | A form definition consists of a TWiki::Form object, which has a list
of field definitions. Each field definition is an object of a type
derived from TWiki::Form::FieldDefinition. These objects are responsible
for the actual syntax and semantics of the field type. Form definitions
are parsed from TWiki tables, and the types are mapped by name to a
class declared in TWiki::Form::* - for example, the text type is mapped
to TWiki::Form::Text and the checkbox type to TWiki::Form::Checkbox . | |||||||
Changed: | ||||||||
< < | This package has smell factor of 9 | |||||||
> > | The TWiki::Form::FieldDefinition class declares default behaviours for | |||||||
Added: | ||||||||
> > | types that accept a single value in their definitions. The
TWiki::Form::ListFieldDefinition extends this for types that have lists
of possible values. | |||||||
Added: | ||||||||
> > |
This package has smell factor of 4
TWiki::Form::FieldDefinitionBase class of all field definition classes. Type-specific classes are derived from this class to define specific per-type behaviours. This class also provides default behaviours for when a specific type cannot be loaded. This package doesn't smellTWiki::Form::ListFieldDefinitionForm field definitions that accept lists of values in the field definition. This is different to being multi-valued, which means the field type can store multiple values. This package has smell factor of 1[[TWikiFormSelectDotPm][]]This package doesn't smell | |||||||
TWiki::Func<-- STARTINCLUDE required for huge TWikiDocumentation topic -->Official list of stable TWiki functions for Plugin developers | ||||||||
Changed: | ||||||||
< < | This module defines official functions that Plugins | |||||||
> > | This module defines official functions that Plugins | |||||||
can use to interact with the TWiki engine and content. Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template Plugin and documentation on how to write a Plugin. Plugins should only use functions published in this module. If you use functions in other TWiki libraries you might create a security hole and you will probably need to change your Plugin when you upgrade TWiki. Deprecated functions will still work in older code, though they should not be called in new Plugins and should be replaced in older Plugins as soon as possible. The version of the TWiki::Func module is defined by the VERSION number of the TWiki::Plugins module, currently 6.10. This can be shown | ||||||||
Changed: | ||||||||
< < | by the %PLUGINVERSION% variable. The 'Since' field in the function
documentation refers to the VERSION number and the date that the function
was addded. | |||||||
> > | by the %PLUGINVERSION% TWiki variable, and accessed in code using
$TWiki::Plugins::VERSION . The 'Since' field in the function
documentation refers to $TWiki::Plugins::VERSION . | |||||||
Changed: | ||||||||
< < | Note: Beware! These methods should only ever be called
from the context of a TWiki Plugin. They require a Plugins SESSION context to be
established before they are called, and will not work if simply called from
another TWiki module. For example,
use TWiki; print TWiki::Func::getSkin(),"\n";will fail with Can't call method "getSkin" on an undefined value at TWiki/Func.pm line 83 . | |||||||
> > | Notes on use of $TWiki::Plugins::VERSION (from 1.2 forwards):
| |||||||
Added: | ||||||||
> > | In addition, deprecation of functions in the interface trigger a minor
version increment. Note that deprecated functions are not removed, they
are merely frozen, and plugin authors are recommended to stop using them.
| |||||||
Deleted: | ||||||||
< < | If you want to call the methods outside the context of a plugin, you can create a Plugins SESSION object. For example,
the script:
use TWiki: $TWiki::Plugins::SESSION = new TWiki(); print TWiki::Func::getSkin(),"\n";will work happily. | |||||||
Deleted: | ||||||||
< < | ||||||||
This package has smell factor of 1
TWiki::I18NSupport for strings translation and language detection. This package has smell factor of 2TWiki::I18N::ExtractSupport translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon). This package has smell factor of 1 | ||||||||
Changed: | ||||||||
< < | TWiki::If | |||||||
> > | TWiki::If::Node | |||||||
Changed: | ||||||||
< < | Support for the conditions in %IF{} statements. Basically a simple | |||||||
> > | Node class for the result of an If statement parse | |||||||
Deleted: | ||||||||
< < | stack-based parser for infix expressions that generates a parse tree that can subsequently be evaluated. | |||||||
This package doesn't smell | ||||||||
Added: | ||||||||
> > | TWiki::If::ParserSupport for the conditions in %IF{} statements. This package doesn't smellTWiki::Infix::ErrorClass of errors used with TWiki::Infix::Parser This package doesn't smellTWiki::Infix::NodeBase class for node types generated by Infix::Parser. You don't have to use it, but it may be useful. This package doesn't smellTWiki::Infix::ParserA simple stack-based parser that parses infix expressions with nonary, unary and binary operators specified using an operator table. Escapes are supported in strings, using backslash. This package doesn't smellTWiki::LineIteratorIterator over the lines in a file This package doesn't smellTWiki::ListIteratorIterator over a list This package doesn't smellTWiki::LoginManager::ApacheLoginThis is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g.,viewauth -> view , editauth -> edit , and so on.
See also TWikiUserAuthentication.
Subclass of TWiki::LoginManager; see that class for documentation of the
methods of this class.
This package has smell factor of 1
TWiki::LoginManagerThe package is also a Factory for login managers and also the base class for all login managers. On it's own, an object of this class is used when you specify 'none' in the security setup section of configure. When it is used, logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class. If you are building a new login manager, then you should write a new subclass of this class, implementing the methods marked as VIRTUAL. There are already examples in thelib/TWiki/LoginManager directory.
The class has extensive tracing, which is enabled by
$TWiki::cfg{Trace}{LoginManager.pm}. The tracing is done in such a way as to
let the perl optimiser optimise out the trace function as a no-op if tracing
is disabled.
Here's an overview of how it works:
Early in TWiki::new, the login manager is created. The creation of the login manager does two things:
ObjectData =twikiThe TWiki object this login manager is attached to. This package has smell factor of 7TWiki::LoginManager::TemplateLoginThis is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. Subclass of TWiki::LoginManager; see that class for documentation of the methods of this class. This package has smell factor of 2 | |||||||
TWiki::MergeSupport for merging strings This package has smell factor of 1TWiki::Meta | ||||||||
Changed: | ||||||||
< < | Meta-data handling. | |||||||
> > | All TWiki topics have data (text) and meta-data (information about the | |||||||
Added: | ||||||||
> > | topic). Meta-data includes information such as file attachments, form fields, topic parentage etc. When TWiki loads a topic from the store, it represents the meta-data in the topic using an object of this class. | |||||||
A meta-data object is a hash of different types of meta-data (keyed on the type, such as 'FIELD' and 'TOPICINFO'). Each entry in the hash is an array, where each entry in the array contains another hash of the key=value pairs, corresponding to a single meta-datum. If there may be multiple entries of the same top-level type (i.e. for FIELD | ||||||||
Changed: | ||||||||
< < | and FILEATTACHMENT) then the array hash multiple entries. These types | |||||||
> > | and FILEATTACHMENT) then the array has multiple entries. These types | |||||||
are referred to as "keyed" types. The array entries are keyed with the attribute 'name' which must be in each entry in the array. For unkeyed types, the array has only one entry. | ||||||||
Changed: | ||||||||
< < | The module knows nothing about how meta-data is stored. That is entirely the responsibility of the Store module. | |||||||
> > | Pictorially,
| |||||||
Added: | ||||||||
> > |
| |||||||
Changed: | ||||||||
< < | Meta-data objects are created by the Store engine when topics are read. They
are populated using the put method. | |||||||
> > | As well as the meta-data, the object also stores the web name, topic name and remaining text after meta-data extraction. | |||||||
Changed: | ||||||||
< < | This package has smell factor of 3 | |||||||
> > | This package has smell factor of 2 | |||||||
TWiki::NetObject that brokers access to network resources. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 2 | |||||||
> > | This package has smell factor of 3 | |||||||
Added: | ||||||||
> > | TWiki::Net::HTTPResponseFakeup of HTTP::Response for use when LWP is not available. Only implements a small subset of the HTTP::Response methods:
| |||||||
TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. | ||||||||
Added: | ||||||||
> > | ||||||||
An OopsException thrown anywhere in the code will redirect the | ||||||||
Changed: | ||||||||
< < | browser to a url based on the oops script. oops requires a
template parameter, that is the name of a template file from
the templates directory. This file will be expanded and the | |||||||
> > | browser to a url based on the oops script. oops requires
the name of an oops template file from the templates directory.
This file will be expanded and the | |||||||
parameter values passed to the exception instantiated. The result will be shown in the browser. | ||||||||
Added: | ||||||||
> > | Plugins may throw TWiki::OopsException. For example: | |||||||
Added: | ||||||||
> > | use Error; | |||||||
Added: | ||||||||
> > | ... throw TWiki::OopsException( 'bathplugin', def => 'toestuck', web => $web, topic => $topic, params => [ 'bigtoe', 'hot tap' ] ); | |||||||
This package doesn't smell
[[TWikiPluginDotPm][]]This package has smell factor of 2TWiki::PluginsThis module defines the singleton object that handles Plugins loading, initialization and execution. This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins. This package doesn't smellTWiki::PluralsHandle conversion of plural topic names to singular form. This package has smell factor of 3TWiki::PrefsThe Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these. Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier. The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!) This package doesn't smellTWiki::Prefs::ParserThis Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics. This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in. This package has smell factor of 1TWiki::Prefs::PrefsCacheThe PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values:
| ||||||||
Added: | ||||||||
> > | TWiki::Query::HoistREsStatic functions to extract regular expressions from queries. The REs can be used in caching stores that use the TWiki standard inline meta-data representation to pre-filter topic lists for more efficient query matching. SeeStore/RcsFile.pm for an example of usage.
This package doesn't smell
TWiki::QueryA Query object is a representation of a query over the TWiki database. Fields are given by name, and values by strings or numbers. Strings should always be surrounded by 'single-quotes'. Numbers can be signed integers or decimals. Single quotes in values may be escaped using backslash (\). See QuerySearch for details of the query language. At the time of writing only a subset of the entire query language is supported, for use in searching. A query object implements theevaluate method as its general
contract with the rest of the world. This method does a "hard work" evaluation
of the parser tree. Of course, smarter Store implementations should be
able to do it better....
This package has smell factor of 2
TWiki::Query::ParserParser for queries This package doesn't smell | |||||||
TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 19 | |||||||
> > | This package has smell factor of 20 | |||||||
TWiki::SandboxThis object provides an interface to the outside world. All calls to system functions, or handling of file names, should be brokered by this object. | ||||||||
Added: | ||||||||
> > | NOTE: TWiki creates a singleton sandbox that is shared by all TWiki runs under a single mod_perl instance. If any TWiki run modifies the sandbox, that modification will carry over in to subsequent runs. Be very, very careful! | |||||||
Deleted: | ||||||||
< < | This package has smell factor of 3 | |||||||
Added: | ||||||||
> > | This package has smell factor of 4 | |||||||
TWiki::SearchThis module implements all the search functionality. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 20 | |||||||
> > | This package has smell factor of 15 | |||||||
TWiki::StoreThis module hosts the generic storage backend. This module provides the interface layer between the "real" store provider - which is hidden behind a handler - and the rest of the system. it is responsible for checking for topic existance, access permissions, and all the other general admin tasks that are common to all store implementations. This module knows nothing about how the data is actually stored - that knowledge is entirely encapsulated in the handlers. The general contract for methods in the class requires that errors are signalled using exceptions. TWiki::AccessControlException is used for access control exceptions, and Error::Simple for all other types of error. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 17 | |||||||
> > | This package has smell factor of 14 | |||||||
Added: | ||||||||
> > | TWiki::Store::QueryAlgorithms::BruteForceDefault brute-force query algorithm Has some basic optimisation: it hoists regular expressions out of the query to use with grep, so we can narrow down the set of topics that we have to evaluate the query on. Not sure exactly where the breakpoint is between the costs of hoisting and the advantages of hoisting. Benchmarks suggest that it's around 6 topics, though this may vary depending on disk speed and memory size. It also depends on the complexity of the query. This package doesn't smell | |||||||
TWiki::Store::RcsFileThis class is PACKAGE PRIVATE to Store, and should never be | ||||||||
Changed: | ||||||||
< < | used from anywhere else. Base class of implementations of stores | |||||||
> > | used from anywhere else. It is the base class of implementations of stores | |||||||
that manipulate RCS format files. The general contract of the methods on this class and its subclasses calls for errors to be signalled by Error::Simple exceptions. Refer to Store.pm for models of usage. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 9 | |||||||
> > | This package has smell factor of 11 | |||||||
TWiki::Store::RcsLiteThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Simple replacement for RCS. Doesn't support:
File formatrcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num }* sym ::= {digit}* idchar {idchar | digit }* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | :Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use. Revisions consist of a sequence of 'a' and 'd' edits that need to be applied to rev N+1 to get rev N. Each edit has an offset (number of lines from start) and length (number of lines). For 'a', the edit is followed by length lines (the lines to be inserted in the text). For example: d1 3 means "delete three lines starting with line 1 a4 2 means "insert two lines at line 4' xxxxxx is the new line 4 yyyyyy is the new line 5 This package has smell factor of 2 TWiki::Store::RcsWrapThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Wrapper around the RCS commands required by TWiki. There is one of these object for each file stored under RCS. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 2 | |||||||
> > | This package has smell factor of 3 | |||||||
TWiki::Store::SearchAlgorithms::ForkingForking implementation of the RCS cache search.search($searchString, $topics, $options, $sDir) -> \%seen | ||||||||
Changed: | ||||||||
< < | Search .txt files in $dir for $string. See RcsFile::searchInWebContent | |||||||
> > | Search .txt files in $dir for $searchString. See RcsFile::searchInWebContent | |||||||
for details. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 2 | |||||||
> > | This package has smell factor of 1 | |||||||
Deleted: | ||||||||
< < | TWiki::Store::SearchAlgorithms::NativeNative implementation of the RCS cache search. Requires tools/native_search to be built and installed.search($searchString, $topics, $options, $sDir) -> \%seenSearch .txt files in $dir for $string. See RcsFile::searchInWebContent for details. Rude and crude, this makes no attempt to handle UTF-8. This package doesn't smell | |||||||
TWiki::Store::SearchAlgorithms::PurePerlPure perl implementation of the RCS cache search.search($searchString, $topics, $options, $sDir) -> \%seenSearch .txt files in $dir for $string. See RcsFile::searchInWebContent for details. This package doesn't smellTWiki::TemplatesSupport for the TWiki template language. This package has smell factor of 2TWiki::TimeTime handling functions. This package has smell factor of 7TWiki::UI::ChangeFormService functions used by the UI packages This package doesn't smellTWiki::UIService functions used by the UI packages This package doesn't smellTWiki::UI::EditEdit command handler This package has smell factor of 1TWiki::UI::ManageUI functions for web, topic and user management This package has smell factor of 5TWiki::UI::OopsUI delegate for oops function This package doesn't smellTWiki::UI::RDiffUI functions for diffing. This package has smell factor of 12TWiki::UI::RegisterUser registration handling. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 19 | |||||||
> > | This package has smell factor of 5 | |||||||
TWiki::UI::SaveUI delegate for save function This package has smell factor of 1TWiki::UI::SearchUI functions for searching. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 3 | |||||||
> > | This package has smell factor of 2 | |||||||
TWiki::UI::StatisticsStatistics extraction and presentation This package has smell factor of 4TWiki::UI::UploadUI delegate for attachment management functions This package has smell factor of 3TWiki::UI::ViewUI delegate for view function This package has smell factor of 2 | ||||||||
Changed: | ||||||||
< < | TWiki::User | |||||||
> > | TWiki::UserMapping | |||||||
Changed: | ||||||||
< < | A User object is an internal representation of a user in the real world. The object knows about users having login names, wiki names, personal topics, and email addresses. | |||||||
> > | This is a virtual base class (a.k.a an interface) for all user mappers. It is not useable as a mapping in TWiki - use the BaseUserMapping for default behaviour. | |||||||
Added: | ||||||||
> > | User mapping is the process by which TWiki maps from a username (a login name) to a display name and back. It is also where groups are maintained. | |||||||
Added: | ||||||||
> > | See TWiki::Users::BaseUserMapping and TWiki::Users::TWikiUserMapping for the default implementations of this interface. | |||||||
Changed: | ||||||||
< < | This package has smell factor of 4 | |||||||
> > | If you want to write a user mapper, you will need to implement the methods | |||||||
Added: | ||||||||
> > | described in this class. | |||||||
Added: | ||||||||
> > | User mappings work by mapping both login names and display names to a
canonical user id. This user id is composed from a prefix that defines
the mapper in use (something like 'BaseUserMapping_' or 'LdapUserMapping_')
and a unique user id that the mapper uses to identify the user.
The null prefix is reserver for the TWikiUserMapping for compatibility
with old TWiki releases.
Note: in all the following documentation, $user refers to a
canonical user id.
This package has smell factor of 1 | |||||||
TWiki::Users::ApacheHtpasswdUserPassword manager that uses Apache::HtPasswd to manage users and passwords. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
Duplicates functionality of
=TWiki::Users::HtPasswdUser=;
provided mainly as an example of how to write a new password manager.
| ||||||||
Changed: | ||||||||
< < | This package doesn't smell | |||||||
> > | This package has smell factor of 1 | |||||||
TWiki::Users | ||||||||
Added: | ||||||||
> > | This package provides services for the lookup and manipulation of login and wiki names of users, and their authentication. | |||||||
Changed: | ||||||||
< < | Singleton object that handles mapping of users to wikinames and vice versa, and user authentication checking. | |||||||
> > | It is a Facade that presents a common interface to the User Mapping and Password modules. The rest of the core should only use the methods | |||||||
Added: | ||||||||
> > | of this package, and should never call the mapping or password managers directly. | |||||||
Added: | ||||||||
> > | TWiki uses the concept of a login name which is used to authenticate a user. A login name maps to a wiki name that is used to identify the user for display. Each login name is unique to a single user, though several login names may map to the same wiki name. | |||||||
Added: | ||||||||
> > | Using this module (and the associated plug-in user mapper) TWiki supports the concept of groups. Groups are sets of login names that are treated equally for the purposes of access control. Group names do not have to be wiki names, though it is helpful for display if they are. | |||||||
Changed: | ||||||||
< < | This package has smell factor of 2 | |||||||
> > | Internally in the code TWiki uses something referred to as a _canonical user | |||||||
Added: | ||||||||
> > | id_ or just user id. The user id is also used externally to uniquely identify the user when (for example) recording topic histories. The user id is usually just the login name, but it doesn't need to be. It just has to be a unique 7-bit alphanumeric and underscore string that can be mapped to/from login and wiki names by the user mapper. | |||||||
Changed: | ||||||||
< < | TWiki::Users::Password | |||||||
> > | The canonical user id should never be seen by a user. On the other hand, | |||||||
Added: | ||||||||
> > | core code should never use anything but a canonical user id to refer to a user. | |||||||
Changed: | ||||||||
< < | Base class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like. | |||||||
> > | Terminology
| |||||||
Added: | ||||||||
> > | assumed to be unique to a human. The Password module is responsible for
authenticating and manipulating login names.
| |||||||
Deleted: | ||||||||
< < | The methods of this class should be overridded by subclasses that want to implement other password handling methods. | |||||||
Added: | ||||||||
> > | This package has smell factor of 5 | |||||||
Changed: | ||||||||
< < | This package has smell factor of 1 | |||||||
> > | TWiki::Users::HtPasswdUser | |||||||
Changed: | ||||||||
< < | TWiki::Users::TWikiUserMapping | |||||||
> > | Support for htpasswd and htdigest format password files. | |||||||
Changed: | ||||||||
< < | User mapping is the process by which TWiki maps from a username (a login name) to a wikiname and back. It is also where groups are maintained. | |||||||
> > | Subclass of TWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class. | |||||||
Deleted: | ||||||||
< < | By default TWiki maintains user topics and group topics in the Main that
define users and group. These topics are
| |||||||
Deleted: | ||||||||
< < | Many sites will want to override this behaviour, for example to get users and groups from a corporate database. | |||||||
Changed: | ||||||||
< < | This class implements the basic TWiki behaviour using topics to store users, but is also designed to be subclassed | |||||||
> > | This package has smell factor of 3 | |||||||
Deleted: | ||||||||
< < | so that other services can be used. | |||||||
Changed: | ||||||||
< < | Subclasses should be named 'XxxxUserMapping' so that configure can find them. | |||||||
> > | TWiki::Users::Password | |||||||
Changed: | ||||||||
< < | All methods in this class should be implemented by subclasses. | |||||||
> > | Base class of all password handlers. Default behaviour is no passwords, | |||||||
Added: | ||||||||
> > | so anyone can be anyone they like. | |||||||
Added: | ||||||||
> > | The methods of this class should be overridded by subclasses that want to implement other password handling methods. | |||||||
Deleted: | ||||||||
< < | This package has smell factor of 3 | |||||||
Added: | ||||||||
> > | This package doesn't smell | |||||||
Changed: | ||||||||
< < | There were a total of 200 smells | |||||||
> > | ||||||||
Added: | ||||||||
> > | There were a total of 192 smells | |||||||
TWiki Source Code Packages![]() pod , so it always matches the running code
On this page:
TWiki::AccessControlExceptionException used raise an access control violation. This package doesn't smellTWiki::AccessA singleton object of this class manages the access control database. This package doesn't smellTWiki::AttachA singleton object of this class is used to deal with attachments to topics. This package has smell factor of 1TWiki::AttrsClass of attribute sets, designed for parsing and storing attribute values from a TWiki tag e.g.%TAG{fred='bad' "sad" joe="mad"}%
An attribute set is a map containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the map.
Attributes declared later in the string will override those of the same
name defined earlier. The one exception to this is the _DEFAULT key, where
the first instance of a setting is always taken.
As well as standard TWiki syntax (parameter values double-quoted)
it also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values,
though none of these alternatives is advertised in documentation and
the extended syntax can be turned off by passing the 'strict' parameter
to new .
This class replaces the old TWiki::extractNameValuePair and
TWiki::extractParameters.
This package doesn't smell
TWiki::Client::ApacheLoginThis is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g.,viewauth -> view , editauth -> edit , and so on.
See also TWikiUserAuthentication.
Subclass of TWiki::Client; see that class for documentation of the
methods of this class.
This package doesn't smell
TWiki::ClientThe package is also a Factory for login managers and also the base class for all login managers. On it's own, an object of this class is used when you specify 'none' in the security setup section of configure. When it is used, logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class. If you are building a new login manager, then you should write a new subclass of this class, implementing the methods marked as VIRTUAL. There are already examples in thelib/TWiki/Client directory.
The class has extensive tracing, which is enabled by
$TWiki::cfg{Trace}{Client.pm}. The tracing is done in such a way as to
let the perl optimiser optimise out the trace function as a no-op if tracing
is disabled.
Here's an overview of how it works:
Early in TWiki::new, the login manager is created. The creation of the login manager does two things:
ObjectData =twikiThe TWiki object this login manager is attached to. This package has smell factor of 2TWiki::Client::TemplateLoginThis is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. Subclass of TWiki::Client; see that class for documentation of the methods of this class. This package has smell factor of 1TWiki::CompatibilitySupport for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed. This package has smell factor of 2TWiki::Configure::LoadPurposeThis module consists of just a single subroutinereadConfig . It allows to
safely modify configuration variables for one single run without affecting
normal TWiki operation.
This package doesn't smell
[[TWikiConfigureUIsEXTENDDotPm][]]This package has smell factor of 1TWikiTWiki operates by creating a singleton object (known as the Session object) that acts as a point of reference for all the different modules in the system. This package is the class for this singleton, and also contains the vast bulk of the basic constants and the per- site configuration mechanisms. Global variables are avoided wherever possible to avoid problems with CGI accelerators such as mod_perl. This package has smell factor of 25TWiki::FormObject representing a single form definition. This package has smell factor of 9TWiki::Func<-- STARTINCLUDE required for huge TWikiDocumentation topic -->Official list of stable TWiki functions for Plugin developers This module defines official functions that Plugins can use to interact with the TWiki engine and content. Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template Plugin and documentation on how to write a Plugin. Plugins should only use functions published in this module. If you use functions in other TWiki libraries you might create a security hole and you will probably need to change your Plugin when you upgrade TWiki. Deprecated functions will still work in older code, though they should not be called in new Plugins and should be replaced in older Plugins as soon as possible. The version of the TWiki::Func module is defined by the VERSION number of the TWiki::Plugins module, currently 6.10. This can be shown by the %PLUGINVERSION% variable. The 'Since' field in the function
documentation refers to the VERSION number and the date that the function
was addded.
Note: Beware! These methods should only ever be called
from the context of a TWiki Plugin. They require a Plugins SESSION context to be
established before they are called, and will not work if simply called from
another TWiki module. For example,
use TWiki; print TWiki::Func::getSkin(),"\n";will fail with Can't call method "getSkin" on an undefined value at TWiki/Func.pm line 83 .
If you want to call the methods outside the context of a plugin, you can create a Plugins SESSION object. For example,
the script:
use TWiki: $TWiki::Plugins::SESSION = new TWiki(); print TWiki::Func::getSkin(),"\n";will work happily. This package has smell factor of 1 TWiki::I18NSupport for strings translation and language detection. This package has smell factor of 2TWiki::I18N::ExtractSupport translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon). This package has smell factor of 1TWiki::IfSupport for the conditions in %IF{} statements. Basically a simple stack-based parser for infix expressions that generates a parse tree that can subsequently be evaluated. This package doesn't smellTWiki::MergeSupport for merging strings This package has smell factor of 1TWiki::MetaMeta-data handling. A meta-data object is a hash of different types of meta-data (keyed on the type, such as 'FIELD' and 'TOPICINFO'). Each entry in the hash is an array, where each entry in the array contains another hash of the key=value pairs, corresponding to a single meta-datum. If there may be multiple entries of the same top-level type (i.e. for FIELD and FILEATTACHMENT) then the array hash multiple entries. These types are referred to as "keyed" types. The array entries are keyed with the attribute 'name' which must be in each entry in the array. For unkeyed types, the array has only one entry. The module knows nothing about how meta-data is stored. That is entirely the responsibility of the Store module. Meta-data objects are created by the Store engine when topics are read. They are populated using theput method.
This package has smell factor of 3
TWiki::NetObject that brokers access to network resources. This package has smell factor of 2TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires a
template parameter, that is the name of a template file from
the templates directory. This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
This package doesn't smell
[[TWikiPluginDotPm][]]This package has smell factor of 2TWiki::PluginsThis module defines the singleton object that handles Plugins loading, initialization and execution. This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins. This package doesn't smellTWiki::PluralsHandle conversion of plural topic names to singular form. This package has smell factor of 3TWiki::PrefsThe Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these. Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier. The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!) This package doesn't smellTWiki::Prefs::ParserThis Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics. This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in. This package has smell factor of 1TWiki::Prefs::PrefsCacheThe PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values:
TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki. This package has smell factor of 19TWiki::SandboxThis object provides an interface to the outside world. All calls to system functions, or handling of file names, should be brokered by this object. This package has smell factor of 3TWiki::SearchThis module implements all the search functionality. This package has smell factor of 20TWiki::StoreThis module hosts the generic storage backend. This module provides the interface layer between the "real" store provider - which is hidden behind a handler - and the rest of the system. it is responsible for checking for topic existance, access permissions, and all the other general admin tasks that are common to all store implementations. This module knows nothing about how the data is actually stored - that knowledge is entirely encapsulated in the handlers. The general contract for methods in the class requires that errors are signalled using exceptions. TWiki::AccessControlException is used for access control exceptions, and Error::Simple for all other types of error. This package has smell factor of 17TWiki::Store::RcsFileThis class is PACKAGE PRIVATE to Store, and should never be used from anywhere else. Base class of implementations of stores that manipulate RCS format files. The general contract of the methods on this class and its subclasses calls for errors to be signalled by Error::Simple exceptions. Refer to Store.pm for models of usage. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 10 | |||||||
> > | This package has smell factor of 9 | |||||||
TWiki::Store::RcsLiteThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Simple replacement for RCS. Doesn't support:
File formatrcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num }* sym ::= {digit}* idchar {idchar | digit }* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | :Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use. Revisions consist of a sequence of 'a' and 'd' edits that need to be applied to rev N+1 to get rev N. Each edit has an offset (number of lines from start) and length (number of lines). For 'a', the edit is followed by length lines (the lines to be inserted in the text). For example: d1 3 means "delete three lines starting with line 1 a4 2 means "insert two lines at line 4' xxxxxx is the new line 4 yyyyyy is the new line 5 This package has smell factor of 2 TWiki::Store::RcsWrapThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Wrapper around the RCS commands required by TWiki. There is one of these object for each file stored under RCS. This package has smell factor of 2 | ||||||||
Added: | ||||||||
> > | TWiki::Store::SearchAlgorithms::ForkingForking implementation of the RCS cache search.search($searchString, $topics, $options, $sDir) -> \%seenSearch .txt files in $dir for $string. See RcsFile::searchInWebContent for details. This package has smell factor of 2TWiki::Store::SearchAlgorithms::NativeNative implementation of the RCS cache search. Requires tools/native_search to be built and installed.search($searchString, $topics, $options, $sDir) -> \%seenSearch .txt files in $dir for $string. See RcsFile::searchInWebContent for details. Rude and crude, this makes no attempt to handle UTF-8. This package doesn't smellTWiki::Store::SearchAlgorithms::PurePerlPure perl implementation of the RCS cache search.search($searchString, $topics, $options, $sDir) -> \%seenSearch .txt files in $dir for $string. See RcsFile::searchInWebContent for details. This package doesn't smell | |||||||
TWiki::TemplatesSupport for the TWiki template language. This package has smell factor of 2TWiki::TimeTime handling functions. This package has smell factor of 7TWiki::UI::ChangeFormService functions used by the UI packages This package doesn't smellTWiki::UIService functions used by the UI packages This package doesn't smellTWiki::UI::EditEdit command handler This package has smell factor of 1TWiki::UI::ManageUI functions for web, topic and user management This package has smell factor of 5TWiki::UI::OopsUI delegate for oops function This package doesn't smellTWiki::UI::RDiffUI functions for diffing. This package has smell factor of 12TWiki::UI::RegisterUser registration handling. This package has smell factor of 19TWiki::UI::SaveUI delegate for save function This package has smell factor of 1TWiki::UI::SearchUI functions for searching. This package has smell factor of 3TWiki::UI::StatisticsStatistics extraction and presentation This package has smell factor of 4TWiki::UI::UploadUI delegate for attachment management functions This package has smell factor of 3TWiki::UI::ViewUI delegate for view function This package has smell factor of 2TWiki::UserA User object is an internal representation of a user in the real world. The object knows about users having login names, wiki names, personal topics, and email addresses. This package has smell factor of 4TWiki::Users::ApacheHtpasswdUserPassword manager that uses Apache::HtPasswd to manage users and passwords. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
Duplicates functionality of
=TWiki::Users::HtPasswdUser=;
provided mainly as an example of how to write a new password manager.
This package doesn't smell
TWiki::UsersSingleton object that handles mapping of users to wikinames and vice versa, and user authentication checking. This package has smell factor of 2TWiki::Users::PasswordBase class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like. The methods of this class should be overridded by subclasses that want to implement other password handling methods. This package has smell factor of 1TWiki::Users::TWikiUserMappingUser mapping is the process by which TWiki maps from a username (a login name) to a wikiname and back. It is also where groups are maintained. By default TWiki maintains user topics and group topics in the Main that define users and group. These topics are
| ||||||||
Changed: | ||||||||
< < | There were a total of 199 smells | |||||||
> > | There were a total of 200 smells | |||||||
TWiki Source Code Packages![]() pod , so it always matches the running code
On this page:
TWiki::AccessControlExceptionException used raise an access control violation. This package doesn't smellTWiki::AccessA singleton object of this class manages the access control database. This package doesn't smellTWiki::AttachA singleton object of this class is used to deal with attachments to topics. This package has smell factor of 1TWiki::AttrsClass of attribute sets, designed for parsing and storing attribute values from a TWiki tag e.g.%TAG{fred='bad' "sad" joe="mad"}%
An attribute set is a map containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the map.
Attributes declared later in the string will override those of the same
name defined earlier. The one exception to this is the _DEFAULT key, where
the first instance of a setting is always taken.
As well as standard TWiki syntax (parameter values double-quoted)
it also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values,
though none of these alternatives is advertised in documentation and
the extended syntax can be turned off by passing the 'strict' parameter
to new .
This class replaces the old TWiki::extractNameValuePair and
TWiki::extractParameters.
This package doesn't smell
TWiki::Client::ApacheLoginThis is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g.,viewauth -> view , editauth -> edit , and so on.
See also TWikiUserAuthentication.
Subclass of TWiki::Client; see that class for documentation of the
methods of this class.
This package doesn't smell
TWiki::ClientThe package is also a Factory for login managers and also the base class for all login managers. On it's own, an object of this class is used when you specify 'none' in the security setup section of configure. When it is used, logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class. If you are building a new login manager, then you should write a new subclass of this class, implementing the methods marked as VIRTUAL. There are already examples in thelib/TWiki/Client directory.
The class has extensive tracing, which is enabled by
$TWiki::cfg{Trace}{Client.pm}. The tracing is done in such a way as to
let the perl optimiser optimise out the trace function as a no-op if tracing
is disabled.
Here's an overview of how it works:
Early in TWiki::new, the login manager is created. The creation of the login manager does two things:
ObjectData =twikiThe TWiki object this login manager is attached to. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 3 | |||||||
> > | This package has smell factor of 2 | |||||||
TWiki::Client::TemplateLoginThis is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. Subclass of TWiki::Client; see that class for documentation of the methods of this class. This package has smell factor of 1TWiki::CompatibilitySupport for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed. This package has smell factor of 2TWiki::Configure::LoadPurposeThis module consists of just a single subroutinereadConfig . It allows to
safely modify configuration variables for one single run without affecting
normal TWiki operation.
This package doesn't smell
[[TWikiConfigureUIsEXTENDDotPm][]]This package has smell factor of 1TWikiTWiki operates by creating a singleton object (known as the Session object) that acts as a point of reference for all the different modules in the system. This package is the class for this singleton, and also contains the vast bulk of the basic constants and the per- site configuration mechanisms. Global variables are avoided wherever possible to avoid problems with CGI accelerators such as mod_perl. This package has smell factor of 25TWiki::FormObject representing a single form definition. This package has smell factor of 9TWiki::Func<-- STARTINCLUDE required for huge TWikiDocumentation topic -->Official list of stable TWiki functions for Plugin developers This module defines official functions that Plugins can use to interact with the TWiki engine and content. Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template Plugin and documentation on how to write a Plugin. Plugins should only use functions published in this module. If you use functions in other TWiki libraries you might create a security hole and you will probably need to change your Plugin when you upgrade TWiki. Deprecated functions will still work in older code, though they should not be called in new Plugins and should be replaced in older Plugins as soon as possible. The version of the TWiki::Func module is defined by the VERSION number of the TWiki::Plugins module, currently 6.10. This can be shown by the %PLUGINVERSION% variable. The 'Since' field in the function
documentation refers to the VERSION number and the date that the function
was addded.
Note: Beware! These methods should only ever be called
from the context of a TWiki Plugin. They require a Plugins SESSION context to be
established before they are called, and will not work if simply called from
another TWiki module. For example,
use TWiki; print TWiki::Func::getSkin(),"\n";will fail with Can't call method "getSkin" on an undefined value at TWiki/Func.pm line 83 .
If you want to call the methods outside the context of a plugin, you can create a Plugins SESSION object. For example,
the script:
use TWiki: $TWiki::Plugins::SESSION = new TWiki(); print TWiki::Func::getSkin(),"\n";will work happily. This package has smell factor of 1 TWiki::I18NSupport for strings translation and language detection. This package has smell factor of 2TWiki::I18N::ExtractSupport translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon). This package has smell factor of 1TWiki::IfSupport for the conditions in %IF{} statements. Basically a simple stack-based parser for infix expressions that generates a parse tree that can subsequently be evaluated. This package doesn't smellTWiki::MergeSupport for merging strings This package has smell factor of 1TWiki::MetaMeta-data handling. A meta-data object is a hash of different types of meta-data (keyed on the type, such as 'FIELD' and 'TOPICINFO'). Each entry in the hash is an array, where each entry in the array contains another hash of the key=value pairs, corresponding to a single meta-datum. If there may be multiple entries of the same top-level type (i.e. for FIELD and FILEATTACHMENT) then the array hash multiple entries. These types are referred to as "keyed" types. The array entries are keyed with the attribute 'name' which must be in each entry in the array. For unkeyed types, the array has only one entry. The module knows nothing about how meta-data is stored. That is entirely the responsibility of the Store module. Meta-data objects are created by the Store engine when topics are read. They are populated using theput method.
This package has smell factor of 3
TWiki::NetObject that brokers access to network resources. This package has smell factor of 2TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires a
template parameter, that is the name of a template file from
the templates directory. This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
This package doesn't smell
[[TWikiPluginDotPm][]]This package has smell factor of 2TWiki::PluginsThis module defines the singleton object that handles Plugins loading, initialization and execution. This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins. This package doesn't smellTWiki::PluralsHandle conversion of plural topic names to singular form. This package has smell factor of 3TWiki::PrefsThe Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these. Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier. The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!) This package doesn't smellTWiki::Prefs::ParserThis Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics. This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in. This package has smell factor of 1TWiki::Prefs::PrefsCacheThe PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values:
TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki. This package has smell factor of 19TWiki::SandboxThis object provides an interface to the outside world. All calls to system functions, or handling of file names, should be brokered by this object. This package has smell factor of 3TWiki::SearchThis module implements all the search functionality. This package has smell factor of 20TWiki::StoreThis module hosts the generic storage backend. This module provides the interface layer between the "real" store provider - which is hidden behind a handler - and the rest of the system. it is responsible for checking for topic existance, access permissions, and all the other general admin tasks that are common to all store implementations. This module knows nothing about how the data is actually stored - that knowledge is entirely encapsulated in the handlers. The general contract for methods in the class requires that errors are signalled using exceptions. TWiki::AccessControlException is used for access control exceptions, and Error::Simple for all other types of error. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 18 | |||||||
> > | This package has smell factor of 17 | |||||||
TWiki::Store::RcsFileThis class is PACKAGE PRIVATE to Store, and should never be used from anywhere else. Base class of implementations of stores that manipulate RCS format files. The general contract of the methods on this class and its subclasses calls for errors to be signalled by Error::Simple exceptions. Refer to Store.pm for models of usage. This package has smell factor of 10TWiki::Store::RcsLiteThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Simple replacement for RCS. Doesn't support:
File formatrcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num }* sym ::= {digit}* idchar {idchar | digit }* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | :Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use. Revisions consist of a sequence of 'a' and 'd' edits that need to be applied to rev N+1 to get rev N. Each edit has an offset (number of lines from start) and length (number of lines). For 'a', the edit is followed by length lines (the lines to be inserted in the text). For example: d1 3 means "delete three lines starting with line 1 a4 2 means "insert two lines at line 4' xxxxxx is the new line 4 yyyyyy is the new line 5 This package has smell factor of 2 TWiki::Store::RcsWrapThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Wrapper around the RCS commands required by TWiki. There is one of these object for each file stored under RCS. This package has smell factor of 2TWiki::TemplatesSupport for the TWiki template language. This package has smell factor of 2TWiki::TimeTime handling functions. This package has smell factor of 7TWiki::UI::ChangeFormService functions used by the UI packages This package doesn't smellTWiki::UIService functions used by the UI packages This package doesn't smellTWiki::UI::EditEdit command handler This package has smell factor of 1TWiki::UI::ManageUI functions for web, topic and user management This package has smell factor of 5TWiki::UI::OopsUI delegate for oops function This package doesn't smellTWiki::UI::RDiffUI functions for diffing. This package has smell factor of 12TWiki::UI::RegisterUser registration handling. This package has smell factor of 19TWiki::UI::SaveUI delegate for save function This package has smell factor of 1TWiki::UI::SearchUI functions for searching. This package has smell factor of 3TWiki::UI::StatisticsStatistics extraction and presentation This package has smell factor of 4TWiki::UI::UploadUI delegate for attachment management functions This package has smell factor of 3TWiki::UI::ViewUI delegate for view function This package has smell factor of 2TWiki::UserA User object is an internal representation of a user in the real world. The object knows about users having login names, wiki names, personal topics, and email addresses. This package has smell factor of 4TWiki::Users::ApacheHtpasswdUserPassword manager that uses Apache::HtPasswd to manage users and passwords. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
Duplicates functionality of
=TWiki::Users::HtPasswdUser=;
provided mainly as an example of how to write a new password manager.
This package doesn't smell
TWiki::UsersSingleton object that handles mapping of users to wikinames and vice versa, and user authentication checking. This package has smell factor of 2TWiki::Users::PasswordBase class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like. The methods of this class should be overridded by subclasses that want to implement other password handling methods. This package has smell factor of 1TWiki::Users::TWikiUserMappingUser mapping is the process by which TWiki maps from a username (a login name) to a wikiname and back. It is also where groups are maintained. By default TWiki maintains user topics and group topics in the Main that define users and group. These topics are
| ||||||||
Changed: | ||||||||
< < | There were a total of 201 smells | |||||||
> > | There were a total of 199 smells | |||||||
TWiki Source Code Packages![]() pod , so it always matches the running code
On this page:
TWiki::AccessControlExceptionException used raise an access control violation. This package doesn't smellTWiki::AccessA singleton object of this class manages the access control database. This package doesn't smellTWiki::AttachA singleton object of this class is used to deal with attachments to topics. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 2 | |||||||
> > | This package has smell factor of 1 | |||||||
TWiki::Attrs | ||||||||
Added: | ||||||||
> > | ||||||||
Class of attribute sets, designed for parsing and storing attribute values
from a TWiki tag e.g. %TAG{fred='bad' "sad" joe="mad"}%
An attribute set is a map containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the map.
Attributes declared later in the string will override those of the same
name defined earlier. The one exception to this is the _DEFAULT key, where
the first instance of a setting is always taken.
As well as standard TWiki syntax (parameter values double-quoted)
it also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values,
though none of these alternatives is advertised in documentation and
the extended syntax can be turned off by passing the 'strict' parameter
to new .
This class replaces the old TWiki::extractNameValuePair and
TWiki::extractParameters.
This package doesn't smell
TWiki::Client::ApacheLogin | ||||||||
Changed: | ||||||||
< < | This is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g., viewauth -> view , editauth -> edit , and so on. | |||||||
> > | This is login manager that you can specify in the security setup section of | |||||||
Added: | ||||||||
> > | configure. It instructs TWiki to
cooperate with your web server (typically Apache) to require authentication
information (username & password) from users. It requires that you configure
your web server to demand authentication for scripts named "login" and anything
ending in "auth". The latter should be symlinks to existing scripts; e.g.,
viewauth -> view , editauth -> edit , and so on. | |||||||
See also TWikiUserAuthentication.
Subclass of TWiki::Client; see that class for documentation of the
methods of this class.
This package doesn't smell
TWiki::ClientThe package is also a Factory for login managers and also the base class for all login managers. On it's own, an object of this class is used when you specify 'none' in the security setup section of | ||||||||
Changed: | ||||||||
< < | configure. When it is used, | |||||||
> > | configure. When it is used, | |||||||
logins are not supported. If you want to authenticate users then you should
consider TemplateLogin or ApacheLogin, which are subclasses of this class.
If you are building a new login manager, then you should write a new subclass
of this class, implementing the methods marked as VIRTUAL. There are already
examples in the lib/TWiki/Client directory.
The class has extensive tracing, which is enabled by
$TWiki::cfg{Trace}{Client.pm}. The tracing is done in such a way as to
let the perl optimiser optimise out the trace function as a no-op if tracing
is disabled. | ||||||||
Added: | ||||||||
> > | Here's an overview of how it works:
Early in TWiki::new, the login manager is created. The creation of the login manager does two things:
| |||||||
ObjectData =twiki | ||||||||
Added: | ||||||||
> > | ||||||||
The TWiki object this login manager is attached to.
This package has smell factor of 3
TWiki::Client::TemplateLogin | ||||||||
Changed: | ||||||||
< < | This is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. | |||||||
> > | This is a login manager that you can specify in the security setup section of | |||||||
Added: | ||||||||
> > | configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. | |||||||
Subclass of TWiki::Client; see that class for documentation of the methods of this class. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 2 | |||||||
> > | This package has smell factor of 1 | |||||||
TWiki::CompatibilitySupport for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed. | ||||||||
Deleted: | ||||||||
< < | =end | |||||||
Deleted: | ||||||||
< < | sub _upgradeCategoryItem { my ( $catitems, $ctext ) = @_; my $catname = ''; my $scatname = ''; my $catmodifier = ''; my $catvalue = ''; my @cmd = split( /\|/, $catitems ); my $src = ''; my $len = @cmd; if( $len < '2' ) { # FIXME return ( $catname, $catmodifier, $catvalue ) } my $svalue = ''; | |||||||
Changed: | ||||||||
< < | my $i; | |||||||
> > | This package has smell factor of 2 | |||||||
Deleted: | ||||||||
< < | my $itemsPerLine; | |||||||
Changed: | ||||||||
< < | # check for CategoryName=CategoryValue parameter | |||||||
> > | TWiki::Configure::Load | |||||||
Deleted: | ||||||||
< < | my $paramCmd = '';
my $cvalue = ''; # was$query->param( $cmd[1] );
if( $cvalue ) {
$src = "<---->$cvalue <---->"; } elsif( $ctext ) { foreach( split( /\r?\n/, $ctext ) ) { if( /$cmd[1]/ ) { $src = $_; last; } } } | |||||||
Changed: | ||||||||
< < | if( $cmd[0] eq 'select' || $cmd[0] eq 'radio') { | |||||||
> > | Purpose | |||||||
Deleted: | ||||||||
< < | $catname = $cmd[1]; $scatname = $catname; #$scatname =~ s/[^a-zA-Z0-9]//g; my $size = $cmd[2]; for( $i = 3; $i < $len; $i++ ) { my $value = $cmd[$i]; $svalue = $value; if( $src =~ /$value/ ) { $catvalue = $svalue; } } | |||||||
Changed: | ||||||||
< < | } elsif( $cmd[0] eq 'checkbox' ) { $catname = $cmd[1]; $scatname = $catname; | |||||||
> > | This module consists of just a single subroutine readConfig . It allows to
safely modify configuration variables for one single run without affecting
normal TWiki operation. | |||||||
Deleted: | ||||||||
< < | #$scatname =~ s/[^a-zA-Z0-9]//g; if( $cmd[2] eq 'true' || $cmd[2] eq '1' ) { $i = $len - 4; $catmodifier = 1; } $itemsPerLine = $cmd[3]; for( $i = 4; $i < $len; $i++ ) { my $value = $cmd[$i]; $svalue = $value; # I18N: FIXME - need to look at this, but since it's upgrading # old forms that probably didn't use I18N, it's not a high # priority. if( $src =~ /$value[^a-zA-Z0-9\.]/ ) { $catvalue .= ", " if( $catvalue ); $catvalue .= $svalue; } } | |||||||
Deleted: | ||||||||
< < | } elsif( $cmd[0] eq 'text' ) {
$catname = $cmd[1];
$scatname = $catname;
#$scatname =~ s/[^a-zA-Z0-9]//g;
$src =~ /<---->(.*) <---->/; if( $1 ) { $src = $1; } else { $src = ''; } $catvalue = $src; } | |||||||
Deleted: | ||||||||
< < | return ( $catname, $catmodifier, $catvalue ) } | |||||||
Added: | ||||||||
> > | This package doesn't smell | |||||||
Added: | ||||||||
> > | [[TWikiConfigureUIsEXTENDDotPm][]] | |||||||
Changed: | ||||||||
< < | This package has smell factor of 2 | |||||||
> > | This package has smell factor of 1 | |||||||
TWikiTWiki operates by creating a singleton object (known as the Session object) that acts as a point of reference for all the different modules in the system. This package is the class for this singleton, and also contains the vast bulk of the basic constants and the per- site configuration mechanisms. Global variables are avoided wherever possible to avoid problems with CGI accelerators such as mod_perl. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 29 | |||||||
> > | This package has smell factor of 25 | |||||||
TWiki::FormObject representing a single form definition. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 10 | |||||||
> > | This package has smell factor of 9 | |||||||
TWiki::Func<-- STARTINCLUDE required for huge TWikiDocumentation topic -->Official list of stable TWiki functions for Plugin developers This module defines official functions that Plugins can use to interact with the TWiki engine and content. Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template Plugin and documentation on how to write a Plugin. Plugins should only use functions published in this module. If you use functions in other TWiki libraries you might create a security hole and you will probably need to change your Plugin when you upgrade TWiki. Deprecated functions will still work in older code, though they should not be called in new Plugins and should be replaced in older Plugins as soon as possible. The version of the TWiki::Func module is defined by the VERSION number of the TWiki::Plugins module, currently 6.10. This can be shown by the %PLUGINVERSION% variable. The 'Since' field in the function
documentation refers to the VERSION number and the date that the function
was addded.
Note: Beware! These methods should only ever be called
from the context of a TWiki Plugin. They require a Plugins SESSION context to be
established before they are called, and will not work if simply called from
another TWiki module. For example,
use TWiki; print TWiki::Func::getSkin(),"\n";will fail with Can't call method "getSkin" on an undefined value at TWiki/Func.pm line 83 .
If you want to call the methods outside the context of a plugin, you can create a Plugins SESSION object. For example,
the script:
use TWiki: $TWiki::Plugins::SESSION = new TWiki(); print TWiki::Func::getSkin(),"\n";will work happily. This package has smell factor of 1 TWiki::I18NSupport for strings translation and language detection. This package has smell factor of 2TWiki::I18N::ExtractSupport translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon). This package has smell factor of 1TWiki::IfSupport for the conditions in %IF{} statements. Basically a simple stack-based parser for infix expressions that generates a parse tree that can subsequently be evaluated. This package doesn't smellTWiki::MergeSupport for merging strings This package has smell factor of 1TWiki::MetaMeta-data handling. A meta-data object is a hash of different types of meta-data (keyed on the type, such as 'FIELD' and 'TOPICINFO'). Each entry in the hash is an array, where each entry in the array contains another hash of the key=value pairs, corresponding to a single meta-datum. If there may be multiple entries of the same top-level type (i.e. for FIELD and FILEATTACHMENT) then the array hash multiple entries. These types are referred to as "keyed" types. The array entries are keyed with the attribute 'name' which must be in each entry in the array. For unkeyed types, the array has only one entry. The module knows nothing about how meta-data is stored. That is entirely the responsibility of the Store module. Meta-data objects are created by the Store engine when topics are read. They are populated using theput method.
| ||||||||
Changed: | ||||||||
< < | This package has smell factor of 6 | |||||||
> > | This package has smell factor of 3 | |||||||
TWiki::NetObject that brokers access to network resources. This package has smell factor of 2TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires a
template parameter, that is the name of a template file from
the templates directory. This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
This package doesn't smell
[[TWikiPluginDotPm][]]This package has smell factor of 2TWiki::PluginsThis module defines the singleton object that handles Plugins loading, initialization and execution. This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins. This package doesn't smellTWiki::PluralsHandle conversion of plural topic names to singular form. This package has smell factor of 3TWiki::PrefsThe Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these. Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier. The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!) This package doesn't smellTWiki::Prefs::ParserThis Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics. This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 2 | |||||||
> > | This package has smell factor of 1 | |||||||
TWiki::Prefs::PrefsCacheThe PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values:
| ||||||||
Changed: | ||||||||
< < | This package has smell factor of 1 | |||||||
> > | This package doesn't smell | |||||||
TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 22 | |||||||
> > | This package has smell factor of 19 | |||||||
TWiki::Sandbox | ||||||||
Added: | ||||||||
> > | ||||||||
This object provides an interface to the outside world. All calls to
system functions, or handling of file names, should be brokered by
this object.
This package has smell factor of 3
TWiki::SearchThis module implements all the search functionality. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 22 | |||||||
> > | This package has smell factor of 20 | |||||||
TWiki::StoreThis module hosts the generic storage backend. This module provides the interface layer between the "real" store provider - which is hidden behind a handler - and the rest of the system. it is responsible for checking for topic existance, access permissions, and all the other general admin tasks that are common to all store implementations. This module knows nothing about how the data is actually stored - that knowledge is entirely encapsulated in the handlers. The general contract for methods in the class requires that errors are signalled using exceptions. TWiki::AccessControlException is used for access control exceptions, and Error::Simple for all other types of error. This package has smell factor of 18TWiki::Store::RcsFileThis class is PACKAGE PRIVATE to Store, and should never be used from anywhere else. Base class of implementations of stores that manipulate RCS format files. The general contract of the methods on this class and its subclasses calls for errors to be signalled by Error::Simple exceptions. Refer to Store.pm for models of usage. This package has smell factor of 10TWiki::Store::RcsLiteThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Simple replacement for RCS. Doesn't support:
File format | ||||||||
Added: | ||||||||
> > | ||||||||
rcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num }* sym ::= {digit}* idchar {idchar | digit }* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | :Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use. Revisions consist of a sequence of 'a' and 'd' edits that need to be applied to rev N+1 to get rev N. Each edit has an offset (number of lines from start) and length (number of lines). For 'a', the edit is followed by length lines (the lines to be inserted in the text). For example: d1 3 means "delete three lines starting with line 1 a4 2 means "insert two lines at line 4' xxxxxx is the new line 4 yyyyyy is the new line 5 This package has smell factor of 2 TWiki::Store::RcsWrapThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Wrapper around the RCS commands required by TWiki. There is one of these object for each file stored under RCS. This package has smell factor of 2TWiki::TemplatesSupport for the TWiki template language. This package has smell factor of 2TWiki::TimeTime handling functions. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 10 | |||||||
> > | This package has smell factor of 7 | |||||||
TWiki::UI::ChangeFormService functions used by the UI packages This package doesn't smellTWiki::UIService functions used by the UI packages This package doesn't smellTWiki::UI::Edit | ||||||||
Added: | ||||||||
> > | ||||||||
Edit command handler
This package has smell factor of 1
TWiki::UI::ManageUI functions for web, topic and user management This package has smell factor of 5TWiki::UI::OopsUI delegate for oops function | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 1 | |||||||
> > | This package doesn't smell | |||||||
TWiki::UI::RDiffUI functions for diffing. This package has smell factor of 12TWiki::UI::RegisterUser registration handling. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 20 | |||||||
> > | This package has smell factor of 19 | |||||||
Deleted: | ||||||||
< < | TWiki::UI::RestRest delegate for view function This package doesn't smell | |||||||
TWiki::UI::SaveUI delegate for save function | ||||||||
Changed: | ||||||||
< < | This package doesn't smell | |||||||
> > | This package has smell factor of 1 | |||||||
TWiki::UI::SearchUI functions for searching. This package has smell factor of 3TWiki::UI::Statistics | ||||||||
Added: | ||||||||
> > | ||||||||
Statistics extraction and presentation
This package has smell factor of 4
TWiki::UI::UploadUI delegate for attachment management functions This package has smell factor of 3TWiki::UI::ViewUI delegate for view function | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 1 | |||||||
> > | This package has smell factor of 2 | |||||||
TWiki::UserA User object is an internal representation of a user in the real world. The object knows about users having login names, wiki names, personal topics, and email addresses. This package has smell factor of 4TWiki::Users::ApacheHtpasswdUserPassword manager that uses Apache::HtPasswd to manage users and passwords. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
Duplicates functionality of
=TWiki::Users::HtPasswdUser=;
provided mainly as an example of how to write a new password manager.
This package doesn't smell
TWiki::Users | ||||||||
Added: | ||||||||
> > | ||||||||
Singleton object that handles mapping of users to wikinames and
vice versa, and user authentication checking.
This package has smell factor of 2
TWiki::Users::PasswordBase class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like. The methods of this class should be overridded by subclasses that want to implement other password handling methods. This package has smell factor of 1TWiki::Users::TWikiUserMappingUser mapping is the process by which TWiki maps from a username (a login name) to a wikiname and back. It is also where groups are maintained. By default TWiki maintains user topics and group topics in the Main that define users and group. These topics are
| ||||||||
Changed: | ||||||||
< < | There were a total of 220 smells | |||||||
> > | There were a total of 201 smells | |||||||
TWiki Source Code Packages![]() pod , so it always matches the running code
On this page:
TWiki::AccessControlExceptionException used raise an access control violation. This package doesn't smellTWiki::AccessA singleton object of this class manages the access control database. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 1 | |||||||
> > | This package doesn't smell | |||||||
TWiki::AttachA singleton object of this class is used to deal with attachments to topics. This package has smell factor of 2TWiki::AttrsClass of attribute sets, designed for parsing and storing attribute values from a TWiki tag e.g.%TAG{fred='bad' "sad" joe="mad"}%
An attribute set is a map containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the map.
Attributes declared later in the string will override those of the same
name defined earlier. The one exception to this is the _DEFAULT key, where
the first instance of a setting is always taken.
As well as standard TWiki syntax (parameter values double-quoted)
it also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values,
though none of these alternatives is advertised in documentation and
the extended syntax can be turned off by passing the 'strict' parameter
to new .
This class replaces the old TWiki::extractNameValuePair and
TWiki::extractParameters.
This package doesn't smell
TWiki::Client::ApacheLoginThis is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g.,viewauth -> view , editauth -> edit , and so on.
See also TWikiUserAuthentication.
Subclass of TWiki::Client; see that class for documentation of the
methods of this class.
This package doesn't smell
TWiki::ClientThe package is also a Factory for login managers and also the base class for all login managers. On it's own, an object of this class is used when you specify 'none' in the security setup section of configure. When it is used, logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class. If you are building a new login manager, then you should write a new subclass of this class, implementing the methods marked as VIRTUAL. There are already examples in thelib/TWiki/Client directory.
The class has extensive tracing, which is enabled by
$TWiki::cfg{Trace}{Client.pm}. The tracing is done in such a way as to
let the perl optimiser optimise out the trace function as a no-op if tracing
is disabled.
ObjectData =twikiThe TWiki object this login manager is attached to. This package has smell factor of 3TWiki::Client::TemplateLoginThis is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. Subclass of TWiki::Client; see that class for documentation of the methods of this class. This package has smell factor of 2TWiki::CompatibilitySupport for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed. =end sub _upgradeCategoryItem { my ( $catitems, $ctext ) = @_; my $catname = ''; my $scatname = ''; my $catmodifier = ''; my $catvalue = ''; my @cmd = split( /\|/, $catitems ); my $src = ''; my $len = @cmd; if( $len < '2' ) { # FIXME return ( $catname, $catmodifier, $catvalue ) } my $svalue = ''; my $i; my $itemsPerLine; # check for CategoryName=CategoryValue parameter my $paramCmd = ''; my $cvalue = ''; # was$query->param( $cmd[1] ); if( $cvalue ) { $src = "<---->$cvalue <---->"; } elsif( $ctext ) { foreach( split( /\r?\n/, $ctext ) ) { if( /$cmd[1]/ ) { $src = $_; last; } } } if( $cmd[0] eq 'select' || $cmd[0] eq 'radio') { $catname = $cmd[1]; $scatname = $catname; #$scatname =~ s/[^a-zA-Z0-9]//g; my $size = $cmd[2]; for( $i = 3; $i < $len; $i++ ) { my $value = $cmd[$i]; $svalue = $value; if( $src =~ /$value/ ) { $catvalue = $svalue; } } } elsif( $cmd[0] eq 'checkbox' ) { $catname = $cmd[1]; $scatname = $catname; #$scatname =~ s/[^a-zA-Z0-9]//g; if( $cmd[2] eq 'true' || $cmd[2] eq '1' ) { $i = $len - 4; $catmodifier = 1; } $itemsPerLine = $cmd[3]; for( $i = 4; $i < $len; $i++ ) { my $value = $cmd[$i]; $svalue = $value; # I18N: FIXME - need to look at this, but since it's upgrading # old forms that probably didn't use I18N, it's not a high # priority. if( $src =~ /$value[^a-zA-Z0-9\.]/ ) { $catvalue .= ", " if( $catvalue ); $catvalue .= $svalue; } } } elsif( $cmd[0] eq 'text' ) { $catname = $cmd[1]; $scatname = $catname; #$scatname =~ s/[^a-zA-Z0-9]//g; $src =~ / <---->(.*) <---->/; if( $1 ) { $src = $1; } else { $src = ''; } $catvalue = $src; } return ( $catname, $catmodifier, $catvalue ) } This package has smell factor of 2 TWikiTWiki operates by creating a singleton object (known as the Session object) that acts as a point of reference for all the different modules in the system. This package is the class for this singleton, and also contains the vast bulk of the basic constants and the per- site configuration mechanisms. Global variables are avoided wherever possible to avoid problems with CGI accelerators such as mod_perl. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 30 | |||||||
> > | This package has smell factor of 29 | |||||||
TWiki::FormObject representing a single form definition. This package has smell factor of 10TWiki::Func<-- STARTINCLUDE required for huge TWikiDocumentation topic -->Official list of stable TWiki functions for Plugin developers This module defines official functions that Plugins can use to interact with the TWiki engine and content. Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template Plugin and documentation on how to write a Plugin. Plugins should only use functions published in this module. If you use functions in other TWiki libraries you might create a security hole and you will probably need to change your Plugin when you upgrade TWiki. Deprecated functions will still work in older code, though they should not be called in new Plugins and should be replaced in older Plugins as soon as possible. The version of the TWiki::Func module is defined by the VERSION number of the TWiki::Plugins module, currently 6.10. This can be shown by the %PLUGINVERSION% variable. The 'Since' field in the function
documentation refers to the VERSION number and the date that the function
was addded.
Note: Beware! These methods should only ever be called
from the context of a TWiki Plugin. They require a Plugins SESSION context to be
established before they are called, and will not work if simply called from
another TWiki module. For example,
use TWiki; print TWiki::Func::getSkin(),"\n";will fail with Can't call method "getSkin" on an undefined value at TWiki/Func.pm line 83 .
If you want to call the methods outside the context of a plugin, you can create a Plugins SESSION object. For example,
the script:
use TWiki: $TWiki::Plugins::SESSION = new TWiki(); print TWiki::Func::getSkin(),"\n";will work happily. This package has smell factor of 1 TWiki::I18NSupport for strings translation and language detection. This package has smell factor of 2TWiki::I18N::ExtractSupport translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon). This package has smell factor of 1TWiki::IfSupport for the conditions in %IF{} statements. Basically a simple stack-based parser for infix expressions that generates a parse tree that can subsequently be evaluated. This package doesn't smellTWiki::MergeSupport for merging strings This package has smell factor of 1TWiki::MetaMeta-data handling. A meta-data object is a hash of different types of meta-data (keyed on the type, such as 'FIELD' and 'TOPICINFO'). Each entry in the hash is an array, where each entry in the array contains another hash of the key=value pairs, corresponding to a single meta-datum. If there may be multiple entries of the same top-level type (i.e. for FIELD and FILEATTACHMENT) then the array hash multiple entries. These types are referred to as "keyed" types. The array entries are keyed with the attribute 'name' which must be in each entry in the array. For unkeyed types, the array has only one entry. The module knows nothing about how meta-data is stored. That is entirely the responsibility of the Store module. Meta-data objects are created by the Store engine when topics are read. They are populated using theput method.
This package has smell factor of 6
TWiki::NetObject that brokers access to network resources. This package has smell factor of 2TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires a
template parameter, that is the name of a template file from
the templates directory. This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
This package doesn't smell
[[TWikiPluginDotPm][]]This package has smell factor of 2TWiki::PluginsThis module defines the singleton object that handles Plugins loading, initialization and execution. This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins. This package doesn't smellTWiki::PluralsHandle conversion of plural topic names to singular form. This package has smell factor of 3TWiki::PrefsThe Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these. Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier. The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!) | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 1 | |||||||
> > | This package doesn't smell | |||||||
TWiki::Prefs::ParserThis Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics. This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in. This package has smell factor of 2TWiki::Prefs::PrefsCacheThe PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values:
TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki. This package has smell factor of 22TWiki::SandboxThis object provides an interface to the outside world. All calls to system functions, or handling of file names, should be brokered by this object. This package has smell factor of 3TWiki::SearchThis module implements all the search functionality. This package has smell factor of 22TWiki::StoreThis module hosts the generic storage backend. This module provides the interface layer between the "real" store provider - which is hidden behind a handler - and the rest of the system. it is responsible for checking for topic existance, access permissions, and all the other general admin tasks that are common to all store implementations. This module knows nothing about how the data is actually stored - that knowledge is entirely encapsulated in the handlers. The general contract for methods in the class requires that errors are signalled using exceptions. TWiki::AccessControlException is used for access control exceptions, and Error::Simple for all other types of error. This package has smell factor of 18TWiki::Store::RcsFileThis class is PACKAGE PRIVATE to Store, and should never be used from anywhere else. Base class of implementations of stores that manipulate RCS format files. The general contract of the methods on this class and its subclasses calls for errors to be signalled by Error::Simple exceptions. Refer to Store.pm for models of usage. This package has smell factor of 10TWiki::Store::RcsLiteThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Simple replacement for RCS. Doesn't support:
File formatrcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num }* sym ::= {digit}* idchar {idchar | digit }* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | :Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use. Revisions consist of a sequence of 'a' and 'd' edits that need to be applied to rev N+1 to get rev N. Each edit has an offset (number of lines from start) and length (number of lines). For 'a', the edit is followed by length lines (the lines to be inserted in the text). For example: d1 3 means "delete three lines starting with line 1 a4 2 means "insert two lines at line 4' xxxxxx is the new line 4 yyyyyy is the new line 5 This package has smell factor of 2 TWiki::Store::RcsWrapThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Wrapper around the RCS commands required by TWiki. There is one of these object for each file stored under RCS. This package has smell factor of 2TWiki::TemplatesSupport for the TWiki template language. This package has smell factor of 2TWiki::TimeTime handling functions. This package has smell factor of 10TWiki::UI::ChangeFormService functions used by the UI packages This package doesn't smellTWiki::UIService functions used by the UI packages This package doesn't smellTWiki::UI::EditEdit command handler This package has smell factor of 1TWiki::UI::ManageUI functions for web, topic and user management This package has smell factor of 5TWiki::UI::OopsUI delegate for oops function This package has smell factor of 1TWiki::UI::RDiffUI functions for diffing. This package has smell factor of 12TWiki::UI::RegisterUser registration handling. This package has smell factor of 20TWiki::UI::RestRest delegate for view function This package doesn't smellTWiki::UI::SaveUI delegate for save function This package doesn't smellTWiki::UI::SearchUI functions for searching. This package has smell factor of 3TWiki::UI::StatisticsStatistics extraction and presentation This package has smell factor of 4TWiki::UI::UploadUI delegate for attachment management functions | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 6 | |||||||
> > | This package has smell factor of 3 | |||||||
TWiki::UI::ViewUI delegate for view function This package has smell factor of 1TWiki::UserA User object is an internal representation of a user in the real world. The object knows about users having login names, wiki names, personal topics, and email addresses. This package has smell factor of 4TWiki::Users::ApacheHtpasswdUserPassword manager that uses Apache::HtPasswd to manage users and passwords. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
Duplicates functionality of
=TWiki::Users::HtPasswdUser=;
provided mainly as an example of how to write a new password manager.
This package doesn't smell
TWiki::UsersSingleton object that handles mapping of users to wikinames and vice versa, and user authentication checking. This package has smell factor of 2TWiki::Users::PasswordBase class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like. The methods of this class should be overridded by subclasses that want to implement other password handling methods. This package has smell factor of 1TWiki::Users::TWikiUserMappingUser mapping is the process by which TWiki maps from a username (a login name) to a wikiname and back. It is also where groups are maintained. By default TWiki maintains user topics and group topics in the Main that define users and group. These topics are
| ||||||||
Changed: | ||||||||
< < | This package has smell factor of 4 | |||||||
> > | This package has smell factor of 3 | |||||||
Changed: | ||||||||
< < | There were a total of 227 smells | |||||||
> > | There were a total of 220 smells | |||||||
TWiki Source Code Packages![]() pod , so it always matches the running code
On this page:
TWiki::AccessControlExceptionException used raise an access control violation. This package doesn't smellTWiki::AccessA singleton object of this class manages the access control database. This package has smell factor of 1TWiki::AttachA singleton object of this class is used to deal with attachments to topics. This package has smell factor of 2TWiki::AttrsClass of attribute sets, designed for parsing and storing attribute values from a TWiki tag e.g.%TAG{fred='bad' "sad" joe="mad"}%
An attribute set is a map containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the map.
Attributes declared later in the string will override those of the same
name defined earlier. The one exception to this is the _DEFAULT key, where
the first instance of a setting is always taken.
As well as standard TWiki syntax (parameter values double-quoted)
it also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values,
though none of these alternatives is advertised in documentation and
the extended syntax can be turned off by passing the 'strict' parameter
to new .
This class replaces the old TWiki::extractNameValuePair and
TWiki::extractParameters.
This package doesn't smell
TWiki::Client::ApacheLoginThis is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g.,viewauth -> view , editauth -> edit , and so on.
See also TWikiUserAuthentication.
Subclass of TWiki::Client; see that class for documentation of the
methods of this class.
This package doesn't smell
TWiki::ClientThe package is also a Factory for login managers and also the base class for all login managers. On it's own, an object of this class is used when you specify 'none' in the security setup section of configure. When it is used, logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class. If you are building a new login manager, then you should write a new subclass of this class, implementing the methods marked as VIRTUAL. There are already examples in thelib/TWiki/Client directory. | ||||||||
Added: | ||||||||
> > | The class has extensive tracing, which is enabled by $TWiki::cfg{Trace}{Client.pm}. The tracing is done in such a way as to let the perl optimiser optimise out the trace function as a no-op if tracing is disabled. | |||||||
Added: | ||||||||
> > | ObjectData =twikiThe TWiki object this login manager is attached to. | |||||||
Added: | ||||||||
> > | ||||||||
This package has smell factor of 3
TWiki::Client::TemplateLoginThis is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. Subclass of TWiki::Client; see that class for documentation of the methods of this class. This package has smell factor of 2TWiki::CompatibilitySupport for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed. =end sub _upgradeCategoryItem { my ( $catitems, $ctext ) = @_; my $catname = ''; my $scatname = ''; my $catmodifier = ''; my $catvalue = ''; my @cmd = split( /\|/, $catitems ); my $src = ''; my $len = @cmd; if( $len < '2' ) { # FIXME return ( $catname, $catmodifier, $catvalue ) } my $svalue = ''; my $i; my $itemsPerLine; # check for CategoryName=CategoryValue parameter my $paramCmd = ''; my $cvalue = ''; # was$query->param( $cmd[1] ); if( $cvalue ) { $src = "<---->$cvalue <---->"; } elsif( $ctext ) { foreach( split( /\r?\n/, $ctext ) ) { if( /$cmd[1]/ ) { $src = $_; last; } } } if( $cmd[0] eq 'select' || $cmd[0] eq 'radio') { $catname = $cmd[1]; $scatname = $catname; #$scatname =~ s/[^a-zA-Z0-9]//g; my $size = $cmd[2]; for( $i = 3; $i < $len; $i++ ) { my $value = $cmd[$i]; $svalue = $value; if( $src =~ /$value/ ) { $catvalue = $svalue; } } } elsif( $cmd[0] eq 'checkbox' ) { $catname = $cmd[1]; $scatname = $catname; #$scatname =~ s/[^a-zA-Z0-9]//g; if( $cmd[2] eq 'true' || $cmd[2] eq '1' ) { $i = $len - 4; $catmodifier = 1; } $itemsPerLine = $cmd[3]; for( $i = 4; $i < $len; $i++ ) { my $value = $cmd[$i]; $svalue = $value; # I18N: FIXME - need to look at this, but since it's upgrading # old forms that probably didn't use I18N, it's not a high # priority. if( $src =~ /$value[^a-zA-Z0-9\.]/ ) { $catvalue .= ", " if( $catvalue ); $catvalue .= $svalue; } } } elsif( $cmd[0] eq 'text' ) { $catname = $cmd[1]; $scatname = $catname; #$scatname =~ s/[^a-zA-Z0-9]//g; $src =~ / <---->(.*) <---->/; if( $1 ) { $src = $1; } else { $src = ''; } $catvalue = $src; } return ( $catname, $catmodifier, $catvalue ) } This package has smell factor of 2 TWikiTWiki operates by creating a singleton object (known as the Session object) that acts as a point of reference for all the different modules in the system. This package is the class for this singleton, and also contains the vast bulk of the basic constants and the per- site configuration mechanisms. Global variables are avoided wherever possible to avoid problems with CGI accelerators such as mod_perl. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 29 | |||||||
> > | This package has smell factor of 30 | |||||||
TWiki::FormObject representing a single form definition. This package has smell factor of 10TWiki::Func<-- STARTINCLUDE required for huge TWikiDocumentation topic -->Official list of stable TWiki functions for Plugin developers This module defines official functions that Plugins can use to interact with the TWiki engine and content. Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template Plugin and documentation on how to write a Plugin. Plugins should only use functions published in this module. If you use functions in other TWiki libraries you might create a security hole and you will probably need to change your Plugin when you upgrade TWiki. Deprecated functions will still work in older code, though they should not be called in new Plugins and should be replaced in older Plugins as soon as possible. The version of the TWiki::Func module is defined by the VERSION number of the TWiki::Plugins module, currently 6.10. This can be shown by the %PLUGINVERSION% variable. The 'Since' field in the function
documentation refers to the VERSION number and the date that the function
was addded.
Note: Beware! These methods should only ever be called
from the context of a TWiki Plugin. They require a Plugins SESSION context to be
established before they are called, and will not work if simply called from
another TWiki module. For example,
use TWiki; print TWiki::Func::getSkin(),"\n";will fail with Can't call method "getSkin" on an undefined value at TWiki/Func.pm line 83 .
If you want to call the methods outside the context of a plugin, you can create a Plugins SESSION object. For example,
the script:
use TWiki: $TWiki::Plugins::SESSION = new TWiki(); print TWiki::Func::getSkin(),"\n";will work happily. This package has smell factor of 1 TWiki::I18NSupport for strings translation and language detection. This package has smell factor of 2TWiki::I18N::ExtractSupport translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon). This package has smell factor of 1TWiki::IfSupport for the conditions in %IF{} statements. Basically a simple stack-based parser for infix expressions that generates a parse tree that can subsequently be evaluated. This package doesn't smellTWiki::MergeSupport for merging strings This package has smell factor of 1TWiki::MetaMeta-data handling. A meta-data object is a hash of different types of meta-data (keyed on the type, such as 'FIELD' and 'TOPICINFO'). Each entry in the hash is an array, where each entry in the array contains another hash of the key=value pairs, corresponding to a single meta-datum. If there may be multiple entries of the same top-level type (i.e. for FIELD and FILEATTACHMENT) then the array hash multiple entries. These types are referred to as "keyed" types. The array entries are keyed with the attribute 'name' which must be in each entry in the array. For unkeyed types, the array has only one entry. The module knows nothing about how meta-data is stored. That is entirely the responsibility of the Store module. Meta-data objects are created by the Store engine when topics are read. They are populated using theput method.
This package has smell factor of 6
TWiki::NetObject that brokers access to network resources. This package has smell factor of 2TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires a
template parameter, that is the name of a template file from
the templates directory. This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
This package doesn't smell
[[TWikiPluginDotPm][]]This package has smell factor of 2TWiki::PluginsThis module defines the singleton object that handles Plugins loading, initialization and execution. This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins. This package doesn't smellTWiki::PluralsHandle conversion of plural topic names to singular form. This package has smell factor of 3TWiki::PrefsThe Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these. Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier. The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!) This package has smell factor of 1TWiki::Prefs::ParserThis Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics. This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 1 | |||||||
> > | This package has smell factor of 2 | |||||||
TWiki::Prefs::PrefsCacheThe PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values:
TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 23 | |||||||
> > | This package has smell factor of 22 | |||||||
TWiki::SandboxThis object provides an interface to the outside world. All calls to system functions, or handling of file names, should be brokered by this object. This package has smell factor of 3TWiki::SearchThis module implements all the search functionality. This package has smell factor of 22TWiki::StoreThis module hosts the generic storage backend. This module provides the interface layer between the "real" store provider - which is hidden behind a handler - and the rest of the system. it is responsible for checking for topic existance, access permissions, and all the other general admin tasks that are common to all store implementations. This module knows nothing about how the data is actually stored - that knowledge is entirely encapsulated in the handlers. The general contract for methods in the class requires that errors are signalled using exceptions. TWiki::AccessControlException is used for access control exceptions, and Error::Simple for all other types of error. This package has smell factor of 18TWiki::Store::RcsFileThis class is PACKAGE PRIVATE to Store, and should never be used from anywhere else. Base class of implementations of stores that manipulate RCS format files. The general contract of the methods on this class and its subclasses calls for errors to be signalled by Error::Simple exceptions. Refer to Store.pm for models of usage. This package has smell factor of 10TWiki::Store::RcsLiteThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Simple replacement for RCS. Doesn't support:
File formatrcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num }* sym ::= {digit}* idchar {idchar | digit }* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | :Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use. Revisions consist of a sequence of 'a' and 'd' edits that need to be applied to rev N+1 to get rev N. Each edit has an offset (number of lines from start) and length (number of lines). For 'a', the edit is followed by length lines (the lines to be inserted in the text). For example: d1 3 means "delete three lines starting with line 1 a4 2 means "insert two lines at line 4' xxxxxx is the new line 4 yyyyyy is the new line 5 This package has smell factor of 2 TWiki::Store::RcsWrapThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Wrapper around the RCS commands required by TWiki. There is one of these object for each file stored under RCS. This package has smell factor of 2TWiki::TemplatesSupport for the TWiki template language. This package has smell factor of 2TWiki::TimeTime handling functions. This package has smell factor of 10TWiki::UI::ChangeFormService functions used by the UI packages This package doesn't smellTWiki::UIService functions used by the UI packages This package doesn't smellTWiki::UI::EditEdit command handler This package has smell factor of 1TWiki::UI::ManageUI functions for web, topic and user management This package has smell factor of 5TWiki::UI::OopsUI delegate for oops function This package has smell factor of 1TWiki::UI::RDiffUI functions for diffing. This package has smell factor of 12TWiki::UI::RegisterUser registration handling. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 28 | |||||||
> > | This package has smell factor of 20 | |||||||
TWiki::UI::RestRest delegate for view function This package doesn't smellTWiki::UI::SaveUI delegate for save function | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 1 | |||||||
> > | This package doesn't smell | |||||||
TWiki::UI::SearchUI functions for searching. This package has smell factor of 3TWiki::UI::StatisticsStatistics extraction and presentation This package has smell factor of 4TWiki::UI::UploadUI delegate for attachment management functions | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 5 | |||||||
> > | This package has smell factor of 6 | |||||||
TWiki::UI::ViewUI delegate for view function This package has smell factor of 1TWiki::UserA User object is an internal representation of a user in the real world. The object knows about users having login names, wiki names, personal topics, and email addresses. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 5 | |||||||
> > | This package has smell factor of 4 | |||||||
TWiki::Users::ApacheHtpasswdUserPassword manager that uses Apache::HtPasswd to manage users and passwords. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
Duplicates functionality of
=TWiki::Users::HtPasswdUser=;
provided mainly as an example of how to write a new password manager.
This package doesn't smell
TWiki::UsersSingleton object that handles mapping of users to wikinames and vice versa, and user authentication checking. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 4 | |||||||
> > | This package has smell factor of 2 | |||||||
TWiki::Users::PasswordBase class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like. The methods of this class should be overridded by subclasses that want to implement other password handling methods. | ||||||||
Changed: | ||||||||
< < | This package doesn't smell | |||||||
> > | This package has smell factor of 1 | |||||||
Added: | ||||||||
> > | TWiki::Users::TWikiUserMapping | |||||||
Changed: | ||||||||
< < | There were a total of 232 smells | |||||||
> > | User mapping is the process by which TWiki maps from a username (a login name) to a wikiname and back. It is also | |||||||
Added: | ||||||||
> > | where groups are maintained.
By default TWiki maintains user topics and group topics in the Main that
define users and group. These topics are
| |||||||
TWiki Source Code Packages![]() pod , so it always matches the running code
On this page:
TWiki::AccessControlExceptionException used raise an access control violation. This package doesn't smellTWiki::AccessA singleton object of this class manages the access control database. This package has smell factor of 1TWiki::AttachA singleton object of this class is used to deal with attachments to topics. This package has smell factor of 2TWiki::AttrsClass of attribute sets, designed for parsing and storing attribute values from a TWiki tag e.g.%TAG{fred='bad' "sad" joe="mad"}%
An attribute set is a map containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the map.
Attributes declared later in the string will override those of the same
name defined earlier. The one exception to this is the _DEFAULT key, where
the first instance of a setting is always taken.
As well as standard TWiki syntax (parameter values double-quoted)
it also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values,
though none of these alternatives is advertised in documentation and
the extended syntax can be turned off by passing the 'strict' parameter
to new .
This class replaces the old TWiki::extractNameValuePair and
TWiki::extractParameters.
This package doesn't smell
TWiki::Client::ApacheLoginThis is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g.,viewauth -> view , editauth -> edit , and so on.
See also TWikiUserAuthentication.
Subclass of TWiki::Client; see that class for documentation of the
methods of this class.
This package doesn't smell
TWiki::ClientThe package is also a Factory for login managers and also the base class for all login managers. On it's own, an object of this class is used when you specify 'none' in the security setup section of configure. When it is used, logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class. If you are building a new login manager, then you should write a new subclass of this class, implementing the methods marked as VIRTUAL. There are already examples in thelib/TWiki/Client directory.
This package has smell factor of 3
TWiki::Client::TemplateLoginThis is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. Subclass of TWiki::Client; see that class for documentation of the methods of this class. This package has smell factor of 2TWiki::CompatibilitySupport for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed. =end sub _upgradeCategoryItem { my ( $catitems, $ctext ) = @_; my $catname = ''; my $scatname = ''; my $catmodifier = ''; my $catvalue = ''; my @cmd = split( /\|/, $catitems ); my $src = ''; my $len = @cmd; if( $len < '2' ) { # FIXME return ( $catname, $catmodifier, $catvalue ) } my $svalue = ''; my $i; my $itemsPerLine; # check for CategoryName=CategoryValue parameter my $paramCmd = ''; my $cvalue = ''; # was$query->param( $cmd[1] ); if( $cvalue ) { $src = "<---->$cvalue <---->"; } elsif( $ctext ) { foreach( split( /\r?\n/, $ctext ) ) { if( /$cmd[1]/ ) { $src = $_; last; } } } if( $cmd[0] eq 'select' || $cmd[0] eq 'radio') { $catname = $cmd[1]; $scatname = $catname; #$scatname =~ s/[^a-zA-Z0-9]//g; my $size = $cmd[2]; for( $i = 3; $i < $len; $i++ ) { my $value = $cmd[$i]; $svalue = $value; if( $src =~ /$value/ ) { $catvalue = $svalue; } } } elsif( $cmd[0] eq 'checkbox' ) { $catname = $cmd[1]; $scatname = $catname; #$scatname =~ s/[^a-zA-Z0-9]//g; if( $cmd[2] eq 'true' || $cmd[2] eq '1' ) { $i = $len - 4; $catmodifier = 1; } $itemsPerLine = $cmd[3]; for( $i = 4; $i < $len; $i++ ) { my $value = $cmd[$i]; $svalue = $value; # I18N: FIXME - need to look at this, but since it's upgrading # old forms that probably didn't use I18N, it's not a high # priority. if( $src =~ /$value[^a-zA-Z0-9\.]/ ) { $catvalue .= ", " if( $catvalue ); $catvalue .= $svalue; } } } elsif( $cmd[0] eq 'text' ) { $catname = $cmd[1]; $scatname = $catname; #$scatname =~ s/[^a-zA-Z0-9]//g; $src =~ / <---->(.*) <---->/; if( $1 ) { $src = $1; } else { $src = ''; } $catvalue = $src; } return ( $catname, $catmodifier, $catvalue ) } This package has smell factor of 2 TWikiTWiki operates by creating a singleton object (known as the Session object) that acts as a point of reference for all the different modules in the system. This package is the class for this singleton, and also contains the vast bulk of the basic constants and the per- site configuration mechanisms. Global variables are avoided wherever possible to avoid problems with CGI accelerators such as mod_perl. This package has smell factor of 29TWiki::FormObject representing a single form definition. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 11 | |||||||
> > | This package has smell factor of 10 | |||||||
TWiki::Func<-- STARTINCLUDE required for huge TWikiDocumentation topic -->Official list of stable TWiki functions for Plugin developers This module defines official functions that Plugins can use to interact with the TWiki engine and content. Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template Plugin and documentation on how to write a Plugin. Plugins should only use functions published in this module. If you use functions in other TWiki libraries you might create a security hole and you will probably need to change your Plugin when you upgrade TWiki. Deprecated functions will still work in older code, though they should not be called in new Plugins and should be replaced in older Plugins as soon as possible. The version of the TWiki::Func module is defined by the VERSION number of the TWiki::Plugins module, currently 6.10. This can be shown by the %PLUGINVERSION% variable. The 'Since' field in the function
documentation refers to the VERSION number and the date that the function
was addded.
Note: Beware! These methods should only ever be called
from the context of a TWiki Plugin. They require a Plugins SESSION context to be
established before they are called, and will not work if simply called from
another TWiki module. For example,
use TWiki; print TWiki::Func::getSkin(),"\n";will fail with Can't call method "getSkin" on an undefined value at TWiki/Func.pm line 83 .
If you want to call the methods outside the context of a plugin, you can create a Plugins SESSION object. For example,
the script:
use TWiki: $TWiki::Plugins::SESSION = new TWiki(); print TWiki::Func::getSkin(),"\n";will work happily. This package has smell factor of 1 TWiki::I18NSupport for strings translation and language detection. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 1 | |||||||
> > | This package has smell factor of 2 | |||||||
TWiki::I18N::ExtractSupport translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon). This package has smell factor of 1TWiki::IfSupport for the conditions in %IF{} statements. Basically a simple stack-based parser for infix expressions that generates a parse tree that can subsequently be evaluated. This package doesn't smell | ||||||||
Deleted: | ||||||||
< < | TWiki::MergeSupport for 3-way merging of strings. Similar to Merge.pm, except that: a) it's considers the ancestor revision of the string, and b) it works. :-P This package doesn't smell | |||||||
TWiki::MergeSupport for merging strings | ||||||||
Changed: | ||||||||
< < | This package doesn't smell | |||||||
> > | This package has smell factor of 1 | |||||||
TWiki::MetaMeta-data handling. A meta-data object is a hash of different types of meta-data (keyed on the type, such as 'FIELD' and 'TOPICINFO'). Each entry in the hash is an array, where each entry in the array contains another hash of the key=value pairs, corresponding to a single meta-datum. If there may be multiple entries of the same top-level type (i.e. for FIELD and FILEATTACHMENT) then the array hash multiple entries. These types are referred to as "keyed" types. The array entries are keyed with the attribute 'name' which must be in each entry in the array. For unkeyed types, the array has only one entry. The module knows nothing about how meta-data is stored. That is entirely the responsibility of the Store module. Meta-data objects are created by the Store engine when topics are read. They are populated using theput method.
This package has smell factor of 6
TWiki::NetObject that brokers access to network resources. This package has smell factor of 2TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires a
template parameter, that is the name of a template file from
the templates directory. This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
This package doesn't smell
[[TWikiPluginDotPm][]]This package has smell factor of 2TWiki::PluginsThis module defines the singleton object that handles Plugins loading, initialization and execution. This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins. This package doesn't smellTWiki::PluralsHandle conversion of plural topic names to singular form. This package has smell factor of 3TWiki::PrefsThe Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these. Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier. The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!) This package has smell factor of 1TWiki::Prefs::ParserThis Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics. This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in. This package has smell factor of 1TWiki::Prefs::PrefsCacheThe PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values:
TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 24 | |||||||
> > | This package has smell factor of 23 | |||||||
TWiki::SandboxThis object provides an interface to the outside world. All calls to system functions, or handling of file names, should be brokered by this object. This package has smell factor of 3TWiki::SearchThis module implements all the search functionality. This package has smell factor of 22TWiki::StoreThis module hosts the generic storage backend. This module provides the interface layer between the "real" store provider - which is hidden behind a handler - and the rest of the system. it is responsible for checking for topic existance, access permissions, and all the other general admin tasks that are common to all store implementations. This module knows nothing about how the data is actually stored - that knowledge is entirely encapsulated in the handlers. The general contract for methods in the class requires that errors are signalled using exceptions. TWiki::AccessControlException is used for access control exceptions, and Error::Simple for all other types of error. | ||||||||
Changed: | ||||||||
< < | This package has smell factor of 17 | |||||||
> > | This package has smell factor of 18 | |||||||
TWiki::Store::RcsFileThis class is PACKAGE PRIVATE to Store, and should never be used from anywhere else. Base class of implementations of stores that manipulate RCS format files. The general contract of the methods on this class and its subclasses calls for errors to be signalled by Error::Simple exceptions. Refer to Store.pm for models of usage. This package has smell factor of 10TWiki::Store::RcsLiteThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Simple replacement for RCS. Doesn't support:
File formatrcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num }* sym ::= {digit}* idchar {idchar | digit }* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | :Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use. Revisions consist of a sequence of 'a' and 'd' edits that need to be applied to rev N+1 to get rev N. Each edit has an offset (number of lines from start) and length (number of lines). For 'a', the edit is followed by length lines (the lines to be inserted in the text). For example: d1 3 means "delete three lines starting with line 1 a4 2 means "insert two lines at line 4' xxxxxx is the new line 4 yyyyyy is the new line 5 This package has smell factor of 2 TWiki::Store::RcsWrapThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Wrapper around the RCS commands required by TWiki. There is one of these object for each file stored under RCS. This package has smell factor of 2TWiki::TemplatesSupport for the TWiki template language. This package has smell factor of 2TWiki::TimeTime handling functions. This package has smell factor of 10TWiki::UI::ChangeFormService functions used by the UI packages This package doesn't smellTWiki::UIService functions used by the UI packages This package doesn't smellTWiki::UI::EditEdit command handler This package has smell factor of 1TWiki::UI::ManageUI functions for web, topic and user management This package has smell factor of 5TWiki::UI::OopsUI delegate for oops function This package has smell factor of 1TWiki::UI::RDiffUI functions for diffing. This package has smell factor of 12TWiki::UI::RegisterUser registration handling. This package has smell factor of 28TWiki::UI::RestRest delegate for view function This package doesn't smellTWiki::UI::SaveUI delegate for save function This package has smell factor of 1TWiki::UI::SearchUI functions for searching. This package has smell factor of 3TWiki::UI::StatisticsStatistics extraction and presentation This package has smell factor of 4TWiki::UI::UploadUI delegate for attachment management functions This package has smell factor of 5TWiki::UI::ViewUI delegate for view function This package has smell factor of 1TWiki::UserA User object is an internal representation of a user in the real world. The object knows about users having login names, wiki names, personal topics, and email addresses. This package has smell factor of 5TWiki::Users::ApacheHtpasswdUserPassword manager that uses Apache::HtPasswd to manage users and passwords. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
Duplicates functionality of
=TWiki::Users::HtPasswdUser=;
provided mainly as an example of how to write a new password manager.
This package doesn't smell
TWiki::UsersSingleton object that handles mapping of users to wikinames and vice versa, and user authentication checking. This package has smell factor of 4TWiki::Users::PasswordBase class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like. The methods of this class should be overridded by subclasses that want to implement other password handling methods. This package doesn't smell | ||||||||
Changed: | ||||||||
< < | There were a total of 231 smells | |||||||
> > | There were a total of 232 smells | |||||||
TWiki Source Code Packages![]() pod , so it always matches the running code
On this page:
TWiki::AccessControlExceptionException used raise an access control violation. This package doesn't smellTWiki::AccessA singleton object of this class manages the access control database. This package has smell factor of 1TWiki::AttachA singleton object of this class is used to deal with attachments to topics. This package has smell factor of 2TWiki::AttrsClass of attribute sets, designed for parsing and storing attribute values from a TWiki tag e.g.%TAG{fred='bad' "sad" joe="mad"}%
An attribute set is a map containing an entry for each parameter. The
default parameter (unnamed quoted string) is named _DEFAULT in the map.
Attributes declared later in the string will override those of the same
name defined earlier. The one exception to this is the _DEFAULT key, where
the first instance of a setting is always taken.
As well as standard TWiki syntax (parameter values double-quoted)
it also parses single-quoted values, unquoted spaceless
values, spaces around the =, and commas as well as spaces separating values,
though none of these alternatives is advertised in documentation and
the extended syntax can be turned off by passing the 'strict' parameter
to new .
This class replaces the old TWiki::extractNameValuePair and
TWiki::extractParameters.
This package doesn't smell
TWiki::Client::ApacheLoginThis is login manager that you can specify in the security setup section of configure. It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g.,viewauth -> view , editauth -> edit , and so on.
See also TWikiUserAuthentication.
Subclass of TWiki::Client; see that class for documentation of the
methods of this class.
This package doesn't smell
TWiki::ClientThe package is also a Factory for login managers and also the base class for all login managers. On it's own, an object of this class is used when you specify 'none' in the security setup section of configure. When it is used, logins are not supported. If you want to authenticate users then you should consider TemplateLogin or ApacheLogin, which are subclasses of this class. If you are building a new login manager, then you should write a new subclass of this class, implementing the methods marked as VIRTUAL. There are already examples in thelib/TWiki/Client directory.
This package has smell factor of 3
TWiki::Client::TemplateLoginThis is a login manager that you can specify in the security setup section of configure. It provides users with a template-based form to enter usernames and passwords, and works with the PasswordManager that you specify to verify those passwords. Subclass of TWiki::Client; see that class for documentation of the methods of this class. This package has smell factor of 2TWiki::CompatibilitySupport for compatibility with old TWiki versions. Packaged separately because 99.999999% of the time this won't be needed. =end sub _upgradeCategoryItem { my ( $catitems, $ctext ) = @_; my $catname = ''; my $scatname = ''; my $catmodifier = ''; my $catvalue = ''; my @cmd = split( /\|/, $catitems ); my $src = ''; my $len = @cmd; if( $len < '2' ) { # FIXME return ( $catname, $catmodifier, $catvalue ) } my $svalue = ''; my $i; my $itemsPerLine; # check for CategoryName=CategoryValue parameter my $paramCmd = ''; my $cvalue = ''; # was$query->param( $cmd[1] ); if( $cvalue ) { $src = "<---->$cvalue <---->"; } elsif( $ctext ) { foreach( split( /\r?\n/, $ctext ) ) { if( /$cmd[1]/ ) { $src = $_; last; } } } if( $cmd[0] eq 'select' || $cmd[0] eq 'radio') { $catname = $cmd[1]; $scatname = $catname; #$scatname =~ s/[^a-zA-Z0-9]//g; my $size = $cmd[2]; for( $i = 3; $i < $len; $i++ ) { my $value = $cmd[$i]; $svalue = $value; if( $src =~ /$value/ ) { $catvalue = $svalue; } } } elsif( $cmd[0] eq 'checkbox' ) { $catname = $cmd[1]; $scatname = $catname; #$scatname =~ s/[^a-zA-Z0-9]//g; if( $cmd[2] eq 'true' || $cmd[2] eq '1' ) { $i = $len - 4; $catmodifier = 1; } $itemsPerLine = $cmd[3]; for( $i = 4; $i < $len; $i++ ) { my $value = $cmd[$i]; $svalue = $value; # I18N: FIXME - need to look at this, but since it's upgrading # old forms that probably didn't use I18N, it's not a high # priority. if( $src =~ /$value[^a-zA-Z0-9\.]/ ) { $catvalue .= ", " if( $catvalue ); $catvalue .= $svalue; } } } elsif( $cmd[0] eq 'text' ) { $catname = $cmd[1]; $scatname = $catname; #$scatname =~ s/[^a-zA-Z0-9]//g; $src =~ / <---->(.*) <---->/; if( $1 ) { $src = $1; } else { $src = ''; } $catvalue = $src; } return ( $catname, $catmodifier, $catvalue ) } This package has smell factor of 2 TWikiTWiki operates by creating a singleton object (known as the Session object) that acts as a point of reference for all the different modules in the system. This package is the class for this singleton, and also contains the vast bulk of the basic constants and the per- site configuration mechanisms. Global variables are avoided wherever possible to avoid problems with CGI accelerators such as mod_perl. This package has smell factor of 29TWiki::FormObject representing a single form definition. This package has smell factor of 11TWiki::Func<-- STARTINCLUDE required for huge TWikiDocumentation topic -->Official list of stable TWiki functions for Plugin developers This module defines official functions that Plugins can use to interact with the TWiki engine and content. Refer to EmptyPlugin and lib/TWiki/Plugins/EmptyPlugin.pm for a template Plugin and documentation on how to write a Plugin. Plugins should only use functions published in this module. If you use functions in other TWiki libraries you might create a security hole and you will probably need to change your Plugin when you upgrade TWiki. Deprecated functions will still work in older code, though they should not be called in new Plugins and should be replaced in older Plugins as soon as possible. The version of the TWiki::Func module is defined by the VERSION number of the TWiki::Plugins module, currently 6.10. This can be shown by the %PLUGINVERSION% variable. The 'Since' field in the function
documentation refers to the VERSION number and the date that the function
was addded.
Note: Beware! These methods should only ever be called
from the context of a TWiki Plugin. They require a Plugins SESSION context to be
established before they are called, and will not work if simply called from
another TWiki module. For example,
use TWiki; print TWiki::Func::getSkin(),"\n";will fail with Can't call method "getSkin" on an undefined value at TWiki/Func.pm line 83 .
If you want to call the methods outside the context of a plugin, you can create a Plugins SESSION object. For example,
the script:
use TWiki: $TWiki::Plugins::SESSION = new TWiki(); print TWiki::Func::getSkin(),"\n";will work happily. This package has smell factor of 1 TWiki::I18NSupport for strings translation and language detection. This package has smell factor of 1TWiki::I18N::ExtractSupport translatable strings extraction from TWiki topics and templates. Depends on Locale::Maketext::Extract (part of CPAN::Locale::Maketext::Lexicon). This package has smell factor of 1TWiki::IfSupport for the conditions in %IF{} statements. Basically a simple stack-based parser for infix expressions that generates a parse tree that can subsequently be evaluated. This package doesn't smellTWiki::MergeSupport for 3-way merging of strings. Similar to Merge.pm, except that: a) it's considers the ancestor revision of the string, and b) it works. :-P This package doesn't smellTWiki::MergeSupport for merging strings This package doesn't smellTWiki::MetaMeta-data handling. A meta-data object is a hash of different types of meta-data (keyed on the type, such as 'FIELD' and 'TOPICINFO'). Each entry in the hash is an array, where each entry in the array contains another hash of the key=value pairs, corresponding to a single meta-datum. If there may be multiple entries of the same top-level type (i.e. for FIELD and FILEATTACHMENT) then the array hash multiple entries. These types are referred to as "keyed" types. The array entries are keyed with the attribute 'name' which must be in each entry in the array. For unkeyed types, the array has only one entry. The module knows nothing about how meta-data is stored. That is entirely the responsibility of the Store module. Meta-data objects are created by the Store engine when topics are read. They are populated using theput method.
This package has smell factor of 6
TWiki::NetObject that brokers access to network resources. This package has smell factor of 2TWiki::OopsExceptionException used to raise a request to redirect to an Oops URL. An OopsException thrown anywhere in the code will redirect the browser to a url based on theoops script. oops requires a
template parameter, that is the name of a template file from
the templates directory. This file will be expanded and the
parameter values passed to the exception instantiated. The
result will be shown in the browser.
This package doesn't smell
[[TWikiPluginDotPm][]]This package has smell factor of 2TWiki::PluginsThis module defines the singleton object that handles Plugins loading, initialization and execution. This class uses Chain of Responsibility (GOF) pattern to dispatch handler calls to registered plugins. This package doesn't smellTWiki::PluralsHandle conversion of plural topic names to singular form. This package has smell factor of 3TWiki::PrefsThe Prefs class is a singleton that implements management of preferences. It uses a stack of TWiki::Prefs::PrefsCache objects to store the preferences for global, web, user and topic contexts, and provides the means to look up preferences in these. Preferences from different places stack on top of each other, so there are global preferences, then site, then web (and subweb and subsubweb), then topic, included topic and so on. Each level of the stack is tagged with a type identifier. The module also maintains a separate of the preferences found in every topic and web it reads. This supports the lookup of preferences for webs and topics that are not on the stack, and must not be chained in (you can't allow a user to override protections from their home topic!) This package has smell factor of 1TWiki::Prefs::ParserThis Prefs-internal class is used to parse * Set and * Local statements from arbitrary text, and extract settings from meta objects. It is used by TopicPrefs to parse preference settings from topics. This class does no validation or duplicate-checking on the settings; it simply returns the recognized settings in the order it sees them in. This package has smell factor of 1TWiki::Prefs::PrefsCacheThe PrefsCache package holds a cache of topics that have been read in, using the TopicPrefs class. These functions manage that cache. We maintain 2 hashes of values:
TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki. This package has smell factor of 24TWiki::SandboxThis object provides an interface to the outside world. All calls to system functions, or handling of file names, should be brokered by this object. This package has smell factor of 3TWiki::SearchThis module implements all the search functionality. This package has smell factor of 22TWiki::StoreThis module hosts the generic storage backend. This module provides the interface layer between the "real" store provider - which is hidden behind a handler - and the rest of the system. it is responsible for checking for topic existance, access permissions, and all the other general admin tasks that are common to all store implementations. This module knows nothing about how the data is actually stored - that knowledge is entirely encapsulated in the handlers. The general contract for methods in the class requires that errors are signalled using exceptions. TWiki::AccessControlException is used for access control exceptions, and Error::Simple for all other types of error. This package has smell factor of 17TWiki::Store::RcsFileThis class is PACKAGE PRIVATE to Store, and should never be used from anywhere else. Base class of implementations of stores that manipulate RCS format files. The general contract of the methods on this class and its subclasses calls for errors to be signalled by Error::Simple exceptions. Refer to Store.pm for models of usage. This package has smell factor of 10TWiki::Store::RcsLiteThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Simple replacement for RCS. Doesn't support:
File formatrcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num}; { branch {num}; } access {id}*; symbols {sym : num}*; locks {id : num}*; {strict ;} { comment {string}; } { expand {string}; } { newphrase }* delta ::= num date num; author id; state {id}; branches {num}*; next {num}; { newphrase }* desc ::= desc string deltatext ::= num log string { newphrase }* text string num ::= {digit | .}+ digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num }* sym ::= {digit}* idchar {idchar | digit }* idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @ string ::= @{any character, with @ doubled}*@ newphrase ::= id word* ; word ::= id | num | string | :Identifiers are case sensitive. Keywords are in lower case only. The sets of keywords and identifiers can overlap. In most environments RCS uses the ISO 8859/1 encoding: visible graphic characters are codes 041-176 and 240-377, and white space characters are codes 010-015 and 040. Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01-12), dd the day (01-31), hh the hour (00-23), mm the minute (00-59), and ss the second (00-60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC. The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use. Revisions consist of a sequence of 'a' and 'd' edits that need to be applied to rev N+1 to get rev N. Each edit has an offset (number of lines from start) and length (number of lines). For 'a', the edit is followed by length lines (the lines to be inserted in the text). For example: d1 3 means "delete three lines starting with line 1 a4 2 means "insert two lines at line 4' xxxxxx is the new line 4 yyyyyy is the new line 5 This package has smell factor of 2 TWiki::Store::RcsWrapThis package does not publish any methods. It implements the virtual methods of the TWiki::Store::RcsFile superclass. Wrapper around the RCS commands required by TWiki. There is one of these object for each file stored under RCS. This package has smell factor of 2TWiki::TemplatesSupport for the TWiki template language. This package has smell factor of 2TWiki::TimeTime handling functions. This package has smell factor of 10TWiki::UI::ChangeFormService functions used by the UI packages This package doesn't smellTWiki::UIService functions used by the UI packages This package doesn't smellTWiki::UI::EditEdit command handler This package has smell factor of 1TWiki::UI::ManageUI functions for web, topic and user management This package has smell factor of 5TWiki::UI::OopsUI delegate for oops function This package has smell factor of 1TWiki::UI::RDiffUI functions for diffing. This package has smell factor of 12TWiki::UI::RegisterUser registration handling. This package has smell factor of 28TWiki::UI::RestRest delegate for view function This package doesn't smellTWiki::UI::SaveUI delegate for save function This package has smell factor of 1TWiki::UI::SearchUI functions for searching. This package has smell factor of 3TWiki::UI::StatisticsStatistics extraction and presentation This package has smell factor of 4TWiki::UI::UploadUI delegate for attachment management functions This package has smell factor of 5TWiki::UI::ViewUI delegate for view function This package has smell factor of 1TWiki::UserA User object is an internal representation of a user in the real world. The object knows about users having login names, wiki names, personal topics, and email addresses. This package has smell factor of 5TWiki::Users::ApacheHtpasswdUserPassword manager that uses Apache::HtPasswd to manage users and passwords. Subclass ofTWiki::Users::Password .
See documentation of that class for descriptions of the methods of this class.
Duplicates functionality of
=TWiki::Users::HtPasswdUser=;
provided mainly as an example of how to write a new password manager.
This package doesn't smell
TWiki::UsersSingleton object that handles mapping of users to wikinames and vice versa, and user authentication checking. This package has smell factor of 4TWiki::Users::PasswordBase class of all password handlers. Default behaviour is no passwords, so anyone can be anyone they like. The methods of this class should be overridded by subclasses that want to implement other password handling methods. This package doesn't smell There were a total of 231 smells |