Tags:
delete_me1Add my vote for this tag stale_content1Add my vote for this tag create new tag
, view all tags
Inspired by ModPerlize I crafted the attached script to analyse usage of globals in the TWiki core. The analysis was run on the checked in code as of 17the June 2004.

If you run the script on a TWiki that has plugins installed, it will analyse the plugins as well.

Global refs are references to the variable outside the module where it was declared. Local refs are refs within the file where it was declared.

Seems to me all those with 0 global refs could be converted to "my" variables now, today, without affecting anything else.

Variable Global refs Local refs Referrer
$TWiki::dispViewPath 0 3  
$TWiki::Plugins::InterwikiPlugin::web 0 2  
$TWiki::wikiToolName 2 3 TWiki::Func, TWiki::Vars::Internal
$TWiki::Attach::attachmentCount 0 2  
$TWiki::Plugins::EmptyPlugin::debug 0 15  
$TWiki::Plugins::EmptyPlugin::user 0 1  
$TWiki::urlCharEncoding 0 3  
$TWiki::wikiPrefsTopicname 3 2 TWiki::Vars::Internal, TWiki::Prefs
$TWiki::statsTopViews 1 1 TWiki::UI::Statistics
$TWiki::mainTopicname 6 6 TWiki::Search, TWiki::Vars::Internal, TWiki::UI::Manage, TWiki::UI
$TWiki::mimeTypesFilename 1 1 TWiki::UI::Viewfile
$TWiki::htpasswdFilename 8 1 TWiki::User::HtPasswdUser
@TWiki::Plugins::instPlugins 0 6  
$TWiki::Plugins::DefaultPlugin::user 0 91  
$TWiki::doLogTopicAttach 1 1 TWiki::UI::Upload
@TWiki::Plugins::registrableHandlers 0 3  
$TWiki::Plugins::InterwikiPlugin::mixedAlphaNum 0 16  
@TWiki::storeSettings 1 1 TWiki::Store
$TWiki::cgiQuery 3 10 TWiki::Vars::Internal
$TWiki::storeTopicImpl 2 1 TWiki::Store
$TWiki::statsTopContrib 1 1 TWiki::UI::Statistics
%TWiki::regex 14 67 TWiki::Func, TWiki::Search, TWiki::UI::Statistics, TWiki::UI::Upload, TWiki::Store
$TWiki::Plugins::InterwikiPlugin::topic 0 3  
$TWiki::Plugins::VERSION 56 2 TWiki::Func, TWiki::Plugins::EmptyPlugin, TWiki::Plugins::DefaultPlugin, TWiki::Plugins::InterwikiPlugin
$TWiki::doGetScriptUrlFromCgi 0 2  
$TWiki::useUnicode 0 0  
$TWiki::useLocale 6 5 TWiki::User::HtPasswdUser, TWiki::Search, TWiki::User::NoPasswdUser, TWiki::Store, TWiki::User, TWiki::Plugins::InterwikiPlugin
$TWiki::debugSystemTime 0 3  
$TWiki::doLogTopicView 1 1 TWiki::UI::View
$TWiki::Plugins::EmptyPlugin::exampleCfgVar 0 1  
$TWiki::UI::Manage::mainTopicname 0 3  
$TWiki::Plugins::InterwikiPlugin::VERSION 0 1  
$TWiki::endRcsCmd 0 1  
$TWiki::wikiHomeUrl 1 2 TWiki::Vars::Internal
$TWiki::scriptSuffix 3 7 TWiki::Vars::Internal, TWiki::Form
$TWiki::scriptUrlPath 4 6 TWiki::Func, TWiki::UI::RDiff, TWiki::UI::View, TWiki::Form
@TWiki::Access::processedGroups 0 4  
$TWiki::localeRegexes 0 2  
%TWiki::Access::allGroups 0 6  
$TWiki::Plugins::EmptyPlugin::web 0 3  
$TWiki::dispScriptUrlPath 1 7 TWiki::Vars::Internal
$TWiki::fgrepCmd 1 1 TWiki::Search
$TWiki::Prefs::finalPrefsName 5 0 TWiki::Prefs
%TWiki::Plugins::onlyOnceHandlers 0 2  
$TWiki::wikiUserName 11 4 TWiki::Func, TWiki::Search, TWiki::Vars::Internal, TWiki::Store
$TWiki::doLogTopicEdit 1 1 TWiki::UI::Edit
$TWiki::Plugins::DefaultPlugin::doOldInclude 0 2  
$TWiki::Plugins::EmptyPlugin::pluginName 0 16  
$TWiki::statisticsTopicname 3 2 TWiki::UI::Statistics, TWiki::Vars::Internal
$TWiki::nullDev 0 1  
$TWiki::wikiUsersTopicname 2 2 TWiki::Vars::Internal, TWiki::User
%TWiki::Prefs::PrefsCache::topicCache 0 4  
$TWiki::Plugins::InterwikiPlugin::prefixPattern 0 2  
$TWiki::TranslationToken 2 6 TWiki::Search
$TWiki::Plugins::EmptyPlugin::topic 0 3  
$TWiki::remoteUserFilename 0 3  
$TWiki::doRemovePortNumber 0 2  
$TWiki::Plugins::EmptyPlugin::installWeb 0 1  
@TWiki::Render::listElements 0 7  
$TWiki::Prefs::requestPrefs 0 5  
$TWiki::webPrefsTopicname 4 2 TWiki::Vars::Internal, TWiki::Prefs, TWiki::UI::Manage
@TWiki::Plugins::disabledPlugins 0 3  
$TWiki::Plugins::InterwikiPlugin::suppressTooltip 0 2  
$TWiki::basicInitDone 0 3  
$TWiki::doRemoveImgInMailnotify 0 1  
$TWiki::keywordMode 0 1  
$TWiki::templateDir 4 1 TWiki::Store, TWiki::UI::View, TWiki::UI::Oops
$TWiki::Net::helloHost 0 3  
%TWiki::Plugins::registeredHandlers 0 5  
$TWiki::Prefs::requestWeb 0 7  
$TWiki::doLogRename 1 1 TWiki::Store
$TWiki::urlHost 8 10 TWiki::Func, TWiki::UI::RDiff, TWiki::Vars::Internal, TWiki::UI::Viewfile, TWiki::UI::View
$TWiki::doMapUserToWikiName 0 2  
$TWiki::Plugins::InterwikiPlugin::pagePattern 0 3  
$TWiki::doLogTopicUpload 1 1 TWiki::UI::Upload
$TWiki::viewScript 0 3  
$TWiki::logDir 0 1  
$TWiki::Plugins::InterwikiPlugin::interSiteLinkRulesTopicName 0 2  
$TWiki::Plugins::EmptyPlugin::VERSION 0 1  
$TWiki::lowerNational 0 2  
$TWiki::Attach::noviewableAttachmentCount 0 2  
@Algorithm::Diff::ISA 0 3  
$TWiki::doPluralToSingular 0 2  
$TWiki::Prefs::globalPrefs 0 3  
$TWiki::lsCmd 0 1  
$TWiki::Plugins::DefaultPlugin::renderingWeb 0 2  
$TWiki::noSpamPadding 2 1 TWiki::Render
$TWiki::Plugins::InterwikiPlugin::debug 0 7  
$TWiki::uploadFilter 1 1 TWiki::UI::Upload
$TWiki::disableAllPlugins 1 3 TWiki::Plugins
$TWiki::Attach::viewableAttachmentCount 0 3  
$TWiki::storeImpl 0 0  
%TWiki::Store::templateVars 0 6  
$TWiki::Plugins::InterwikiPlugin::postfixPattern 0 2  
%TWiki::User::HtPasswdUser::templateVars 0 0  
%TWiki::Plugins::InterwikiPlugin::interSiteTable 0 3  
@Algorithm::Diff::EXPORT 0 1  
$TWiki::doLogTopicSearch 1 1 TWiki::Search
$TWiki::siteLang 1 4 TWiki::Vars::Internal
$TWiki::Net::useNetSmtp 0 3  
$TWiki::doLogTopicSave 3 1 TWiki::Store
$TWiki::safeEnvPath 0 3  
$TWiki::userListFilename 0 2  
$TWiki::attachAsciiPath 0 1  
%TWiki::User::templateVars 0 1  
%TWiki::mon2num 0 2  
$TWiki::defaultUrlHost 0 2  
%TWiki::EXPORT_TAGS 0 1  
$TWiki::Plugins::InterwikiPlugin::sitePattern 0 5  
$TWiki::Render::newTopicBgColor 0 2  
$TWiki::siteLocale 0 9  
$Algorithm::Diff::VERSION 1 1 TWiki::Store::RcsLite
$TWiki::siteWebTopicName 0 3  
$TWiki::numberOfRevisions 6 1 TWiki::UI::RDiff, TWiki::UI::View
$TWiki::OS 4 1 TWiki::Store::RcsWrap, TWiki::UI::Statistics, TWiki::UI::Upload
$TWiki::wikiversion 1 2 TWiki::Vars::Internal
$TWiki::upperNational 0 2  
$TWiki::Plugins::DefaultPlugin::installWeb 0 10  
$TWiki::siteCharsetOverride 0 2  
$TWiki::doSecureInclude 0 2  
@TWiki::publicWebList 0 5  
$TWiki::Plugins::DefaultPlugin::debug 0 21  
$TWiki::egrepCmd 1 1 TWiki::Search
$TWiki::pubDir 1 3 TWiki
$TWiki::logFilename 2 1 TWiki::UI::Statistics, TWiki::Store
$TWiki::defaultUserName 2 6 TWiki::Func, TWiki::Store::RcsFile
$TWiki::Plugins::initialisationErrors 0 2  
$TWiki::webName 25 27 TWiki::Search, TWiki::Access, TWiki::Vars::Internal, TWiki, TWiki::Render, TWiki::Store
$TWiki::script 0 4  
$TWiki::displayTimeValues 0 4  
$TWiki::Search::cacheRev1date 0 2  
$TWiki::readTopicPermissionFailed 6 1 TWiki::UI::RDiff, TWiki::Store, TWiki::UI::View
%TWiki::wikiToUserList 0 3  
$TWiki::Vars::Parser::varChars 0 3  
$TWiki::doDebugStatistics 3 1 TWiki::UI::Statistics
$TWiki::superAdminGroup 4 1 TWiki::Access, TWiki::UI
$TWiki::doLogTopicRdiff 1 1 TWiki::UI::RDiff
$TWiki::Net::mailInitialized 0 3  
$TWiki::doLogRegistration 0 1  
$TWiki::wikiName 2 13 TWiki::Func, TWiki::Vars::Internal
$TWiki::mainWebname 20 8 TWiki::Func, TWiki::UI::Edit, TWiki::Vars::Internal, TWiki::Prefs, TWiki::UI, TWiki::UI::Statistics, TWiki::Access, TWiki::User, TWiki::Form
@TWiki::Render::listTypes 0 11  
$TWiki::siteCharset 1 20 TWiki::Vars::Internal
$TWiki::Net::mailHost 0 5  
@Algorithm::Diff::EXPORT_OK 0 1  
%TWiki::Prefs::webPrefs 0 8  
@TWiki::weekDay 0 3  
$TWiki::userName 12 11 TWiki::Vars::Internal, TWiki::Store::RcsFile, TWiki::Store
$TWiki::doKeepRevIfEditLock 1 1 TWiki::Store
$TWiki::includingTopicName 1 4 TWiki::Vars::Internal
$TWiki::pubUrlPath 3 8 TWiki::Attach, TWiki::Vars::Internal
$TWiki::formatVersion 1 1 TWiki::Store
$TWiki::mailProgram 2 1 TWiki::Net
$TWiki::twikiWebname 10 3 TWiki::Func, TWiki::Plugins, TWiki::Attach, TWiki::Vars::Internal, TWiki::Prefs, TWiki::Store
@TWiki::EXPORT_OK 0 1  
$TWiki::dataDir 26 8 TWiki::UI::Changes, TWiki::Search, TWiki, TWiki::Render, TWiki::UI::Manage, TWiki::Store
$TWiki::includingWebName 1 4 TWiki::Vars::Internal
$TWiki::Render::isList 0 8  
%TWiki::userToWikiList 0 3  
$TWiki::pageMode 0 4  
@TWiki::Plugins::activePluginWebs 0 4  
$TWiki::Plugins::InterwikiPlugin::installWeb 0 3  
$TWiki::Plugins::InterwikiPlugin::upperAlpha 0 18  
%TWiki::User::NoPasswdUser::templateVars 0 0  
@TWiki::isoMonth 3 5 TWiki::UI::Edit, TWiki::UI::Statistics, TWiki::Store
$TWiki::rcsArg 0 1  
$TWiki::doLogTopicChanges 1 1 TWiki::UI::Changes
$TWiki::Plugins::DefaultPlugin::web 0 319  
$TWiki::Plugins::DefaultPlugin::VERSION 0 1  
$TWiki::Plugins::InterwikiPlugin::user 0 1  
$TWiki::Plugins::DefaultPlugin::pluginName 0 17  
@TWiki::ISA 0 1  
$TWiki::Render::newTopicFontColor 0 2  
@TWiki::Plugins::activePluginTopics 0 8  
$TWiki::debugFilename 0 3  
$TWiki::Plugins::DefaultPlugin::topic 0 343  
$TWiki::Search::cacheRev1user 0 4  
$TWiki::notifyTopicname 1 3 TWiki::Vars::Internal
$TWiki::editLockTime 8 1 TWiki::Func, TWiki::UI::Edit, TWiki::UI::Manage, TWiki::Store
$TWiki::securityFilter 11 8 TWiki::Search, TWiki::Store::RcsWrap, TWiki::UI::Manage, TWiki::Store
$TWiki::debugUserTime 0 4  
$TWiki::cmdQuote 2 1 TWiki::Search
$TWiki::warningFilename 1 4 TWiki::Store::RcsWrap
$TWiki::User::UserImpl 0 5  
$TWiki::topicName 9 23 TWiki::Search, TWiki::Vars::Internal, TWiki::Render, TWiki::Prefs, TWiki::Store
$TWiki::siteFullLang 1 3 TWiki::Vars::Internal
$TWiki::doSuperAdminGroup 1 1 TWiki::Access
$TWiki::rcsDir 0 1  
$TWiki::doHidePasswdInRegistration 0 1  
$TWiki::doRememberRemoteUser 0 4  
$TWiki::twikiLibDir 0 11  
$TWiki::Search::cacheRev1webTopic 0 3  
$TWiki::Render::linkToolTipInfo 0 9  
$TWiki::Render::noAutoLink 0 11  

-- CrawfordCurrie - 19 Jun 2004

fixed typo -- mhw

Nice work!

-- MartinCleaver - 07 Sep 2004

- hooly dooly smile thanks. thats an interesting list! -- SvenDowideit - 19 Jun 2004 - 16:29

Session-specific globals are now held in a single TWiki "session" object. This topic is therefore redundant. DeleteMe.

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt qa.pl.txt r1 manage 3.4 K 2004-06-19 - 18:49 CrawfordCurrie  
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2005-02-13 - CrawfordCurrie
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.