Changeset 1041


Ignore:
Timestamp:
11/28/08 13:33:03 (3 years ago)
Author:
CrawfordCurrie
Message:

Item175: Added Foswiki::Time to published APIs and deprecated the duplicates in Foswiki::Func, cleaned up versioning of published APIs and added VERSION to each. Item295: changed =pod to =begin TML

Location:
trunk
Files:
86 edited

Legend:

Unmodified
Added
Removed
  • trunk/EditTablePlugin/lib/Foswiki/Plugins/EditTablePlugin.pm

    r893 r1041  
    131131} 
    132132 
    133 =pod 
     133=begin TML 
    134134 
    135135Style sheet for table in view mode 
     
    150150} 
    151151 
    152 =pod 
     152=begin TML 
    153153 
    154154Style sheet and javascript for table in edit mode 
  • trunk/EmptyPlugin/lib/Foswiki/Plugins/EmptyPlugin.pm

    r1022 r1041  
    11# See bottom of file for default license and copyright information 
    22 
    3 =pod 
     3=begin TML 
    44 
    55---+ package EmptyPlugin 
     
    8888$pluginName = 'EmptyPlugin'; 
    8989 
    90 =pod 
     90=begin TML 
    9191 
    9292---++ initPlugin($topic, $web, $user, $installWeb) -> $boolean 
     
    172172} 
    173173 
    174 =pod 
     174=begin TML 
    175175 
    176176---++ earlyInitPlugin() 
     
    187187} 
    188188 
    189 =pod 
     189=begin TML 
    190190 
    191191---++ initializeUserHandler( $loginName, $url, $pathInfo ) 
     
    212212} 
    213213 
    214 =pod 
     214=begin TML 
    215215 
    216216---++ registrationHandler($web, $wikiName, $loginName ) 
     
    232232} 
    233233 
    234 =pod 
     234=begin TML 
    235235 
    236236---++ commonTagsHandler($text, $topic, $web, $included, $meta ) 
     
    281281} 
    282282 
    283 =pod 
     283=begin TML 
    284284 
    285285---++ beforeCommonTagsHandler($text, $topic, $web, $meta ) 
     
    311311} 
    312312 
    313 =pod 
     313=begin TML 
    314314 
    315315---++ afterCommonTagsHandler($text, $topic, $web, $meta ) 
     
    338338} 
    339339 
    340 =pod 
     340=begin TML 
    341341 
    342342---++ preRenderingHandler( $text, \%map ) 
     
    391391} 
    392392 
    393 =pod 
     393=begin TML 
    394394 
    395395---++ postRenderingHandler( $text ) 
     
    411411} 
    412412 
    413 =pod 
     413=begin TML 
    414414 
    415415---++ beforeEditHandler($text, $topic, $web ) 
     
    434434} 
    435435 
    436 =pod 
     436=begin TML 
    437437 
    438438---++ afterEditHandler($text, $topic, $web, $meta ) 
     
    460460} 
    461461 
    462 =pod 
     462=begin TML 
    463463 
    464464---++ beforeSaveHandler($text, $topic, $web, $meta ) 
     
    488488} 
    489489 
    490 =pod 
     490=begin TML 
    491491 
    492492---++ afterSaveHandler($text, $topic, $web, $error, $meta ) 
     
    513513} 
    514514 
    515 =pod 
     515=begin TML 
    516516 
    517517---++ afterRenameHandler( $oldWeb, $oldTopic, $oldAttachment, $newWeb, $newTopic, $newAttachment ) 
     
    538538} 
    539539 
    540 =pod 
     540=begin TML 
    541541 
    542542---++ beforeAttachmentSaveHandler(\%attrHash, $topic, $web ) 
     
    563563} 
    564564 
    565 =pod 
     565=begin TML 
    566566 
    567567---++ afterAttachmentSaveHandler(\%attrHash, $topic, $web, $error ) 
     
    586586} 
    587587 
    588 =pod 
     588=begin TML 
    589589 
    590590---++ mergeHandler( $diff, $old, $new, \%info ) -> $text 
     
    635635} 
    636636 
    637 =pod 
     637=begin TML 
    638638 
    639639---++ modifyHeaderHandler( \%headers, $query ) 
     
    662662} 
    663663 
    664 =pod 
     664=begin TML 
    665665 
    666666---++ redirectCgiQueryHandler($query, $url ) 
     
    685685} 
    686686 
    687 =pod 
     687=begin TML 
    688688 
    689689---++ renderFormFieldForEditHandler($name, $type, $size, $value, $attributes, $possibleValues) -> $html 
     
    717717} 
    718718 
    719 =pod 
     719=begin TML 
    720720 
    721721---++ renderWikiWordHandler($linkText, $hasExplicitLinkLabel, $web, $topic) -> $linkText 
     
    739739} 
    740740 
    741 =pod 
     741=begin TML 
    742742 
    743743---++ completePageHandler($html, $httpHeaders) 
     
    760760} 
    761761 
    762 =pod 
     762=begin TML 
    763763 
    764764---++ restExample($session) -> $text 
  • trunk/InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin.pm

    r811 r1041  
    1616# As per the GPL, removal of this notice is prohibited. 
    1717 
    18 =pod 
     18=begin TML 
    1919 
    2020---+ package Foswiki::Plugins::InterwikiPlugin 
  • trunk/PerlDocPlugin/lib/TWiki/Plugins/PerlDocPlugin.pm

    r1039 r1041  
    3939# variables elsewhere in TWiki!! 
    4040 
    41 =begin TML 
     41=begin twiki 
     42 
    4243---+ Testing TWiki formatting 
    4344| *simple* | *table* | 
     
    5455Last paragraph of this document block 
    5556 
    56 =end TML 
     57=end twiki 
    5758 
    5859=cut 
     
    127128    } 
    128129 
    129     if( $format =~ /(pod|twiki|raw)/ ) { 
     130    if( $format =~ /(pod|twiki|raw|TML)/ ) { 
    130131        $text =~ s/&/&amp\;/go; 
    131132        $text =~ s/</&lt\;/go; 
     
    171172                $mode = "twiki"; 
    172173            } elsif( $tag =~ /^begin$/i ) { 
    173                 if( $data =~ /^(html|twiki)/i ) { 
     174                if( $data =~ /^(html|twiki|TML)/i ) { 
    174175                    $data =~ s@([\r\n])( +)@"$1" . "\t" x (length($2)/3)@ges; 
    175176                    $data =~ s/^(html|twiki)//i; 
     
    184185                $text .= "---" . "+" x $1 . renderInteriorSequences( " $data" ) . "\n"; 
    185186            } elsif( $tag =~ /^for$/i ) { 
    186                 if( $data =~ /^(html|twiki)/i ) { 
     187                if( $data =~ /^(html|twiki|TML)/i ) { 
    187188                    $data =~ s@([\r\n])( +)@"$1" . "\t" x (length($2)/3)@ges; 
    188189                    $data =~ s/^(html|twiki)\s*//i; 
     
    200201                $text .= renderInteriorSequences( "$_" ) . "\n\n"; 
    201202            } 
    202         } elsif( $mode eq "twiki" ) { 
     203        } elsif( $mode eq "twiki" || $mode eq 'TML' ) { 
    203204            if( $tag =~ /^end$/i ) { 
    204205                $mode = ""; 
  • trunk/TWikiCompatibilityPlugin/lib/Foswiki/Plugins/TWikiCompatibilityPlugin.pm

    r1038 r1041  
    1212# http://www.gnu.org/copyleft/gpl.html 
    1313 
    14 =pod 
     14=begin TML 
    1515 
    1616---+ package Foswiki::Plugins::TWikiCompatibilityPlugin 
     
    3434$pluginName = 'TWikiCompatibilityPlugin'; 
    3535 
    36 =pod 
     36=begin TML 
    3737 
    3838---++ initPlugin($topic, $web, $user, $installWeb) -> $boolean 
     
    4949} 
    5050 
    51 =pod 
     51=begin TML 
    5252 
    5353---++ earlyInitPlugin() 
  • trunk/TwistyPlugin/lib/Foswiki/Plugins/TwistyPlugin.pm

    r1033 r1041  
    1717# 
    1818 
    19 =pod 
     19=begin TML 
    2020 
    2121---+ package TwistyPlugin 
     
    373373} 
    374374 
    375 =pod 
     375=begin TML 
    376376 
    377377Reads a setting from the FOSWIKIPREF cookie. 
  • trunk/core/data/System/DevelopingPlugins.txt

    r920 r1041  
    1414   * =[[%SCRIPTURL{view}%/%SYSTEMWEB%/PerlDoc?module=Foswiki::AccessControlException][Foswiki::AccessControlException]]= - access control exception 
    1515   * =[[%SCRIPTURL{view}%/%SYSTEMWEB%/PerlDoc?module=Foswiki::Attrs][Foswiki::Attrs]]= - parser and storage object for macro parameters 
     16   * =[[%SCRIPTURL{view}%/%SYSTEMWEB%/PerlDoc?module=Foswiki::Time][Foswiki::Time]]= - time parsing and formatting 
    1617In addition the following global variables may be referred to: 
    17    * =$Foswiki::Plugins::VERSION= - API version number 
     18   * =$Foswiki::Plugins::VERSION= - plugin handler API version number 
    1819   * =$Foswiki::Plugins::SESSION= - reference to =Foswiki= singleton object 
    1920   * =$Foswiki::cfg= - reference to configuration hash 
  • trunk/core/data/System/PerlDoc.txt

    r920 r1041  
    1 ---+ %URLPARAM{module}% 
    2 %INCLUDE{"doc:%URLPARAM{module}%" level="2"}% 
     1---+!! %URLPARAM{module}% 
     2%INCLUDE{"doc:%URLPARAM{module}%" level="1"}% 
  • trunk/core/lib/Foswiki.pm

    r1039 r1041  
    22package Foswiki; 
    33 
    4 =pod 
     4=begin TML 
    55 
    66---+ package Foswiki 
     
    9393$TranslationToken = "\0"; 
    9494 
    95 =pod 
     95=begin TML 
    9696 
    9797---++ StaticMethod getLibDir() -> $path 
     
    526526} 
    527527 
    528 =pod 
     528=begin TML 
    529529 
    530530---++ ObjectMethod UTF82SiteCharSet( $utf8 ) -> $ascii 
     
    626626} 
    627627 
    628 =pod 
     628=begin TML 
    629629 
    630630---++ ObjectMethod writeCompletePage( $text, $pageType, $contentType ) 
     
    673673} 
    674674 
    675 =pod 
     675=begin TML 
    676676 
    677677---++ ObjectMethod generateHTTPHeaders( $query, $pageType, $contentType ) -> $header 
     
    749749} 
    750750 
    751 =pod 
     751=begin TML 
    752752 
    753753---++ StaticMethod isRedirectSafe($redirect) => $ok 
     
    813813} 
    814814 
    815 =pod 
     815=begin TML 
    816816 
    817817---++ ObjectMethod redirect( $url, $passthrough, $action_redirectto ) 
     
    923923} 
    924924 
    925 =pod 
     925=begin TML 
    926926 
    927927---++ ObjectMethod cacheQuery() -> $queryString 
     
    963963} 
    964964 
    965 =pod 
     965=begin TML 
    966966 
    967967---++ StaticMethod isValidWikiWord( $name ) -> $boolean 
     
    976976} 
    977977 
    978 =pod 
     978=begin TML 
    979979 
    980980---++ StaticMethod isValidTopicName( $name ) -> $boolean 
     
    990990} 
    991991 
    992 =pod 
     992=begin TML 
    993993 
    994994---++ StaticMethod isValidAbbrev( $name ) -> $boolean 
     
    10031003} 
    10041004 
    1005 =pod 
     1005=begin TML 
    10061006 
    10071007---++ StaticMethod isValidWebName( $name, $system ) -> $boolean 
     
    10231023} 
    10241024 
    1025 =pod 
     1025=begin TML 
    10261026 
    10271027---++ ObjectMethod readOnlyMirrorWeb( $theWeb ) -> ( $mirrorSiteName, $mirrorViewURL, $mirrorLink, $mirrorNote ) 
     
    10651065} 
    10661066 
    1067 =pod 
     1067=begin TML 
    10681068 
    10691069---++ ObjectMethod getSkin () -> $string 
     
    10941094} 
    10951095 
    1096 =pod 
     1096=begin TML 
    10971097 
    10981098---++ ObjectMethod getScriptUrl( $absolute, $script, $web, $topic, ... ) -> $scriptURL 
     
    11871187} 
    11881188 
    1189 =pod 
     1189=begin TML 
    11901190 
    11911191---++ ObjectMethod getPubUrl($absolute, $web, $topic, $attachment) -> $url 
     
    12371237} 
    12381238 
    1239 =pod 
     1239=begin TML 
    12401240 
    12411241---++ ObjectMethod getIconUrl( $absolute, $iconName ) -> $iconURL 
     
    12591259} 
    12601260 
    1261 =pod 
     1261=begin TML 
    12621262 
    12631263---++ ObjectMethod mapToIconFileName( $fileName, $default ) -> $fileName 
     
    12981298} 
    12991299 
    1300 =pod 
     1300=begin TML 
    13011301 
    13021302---++ ObjectMethod normalizeWebTopicName( $theWeb, $theTopic ) -> ( $theWeb, $theTopic ) 
     
    13341334} 
    13351335 
    1336 =pod 
     1336=begin TML 
    13371337 
    13381338---++ ClassMethod new( $loginName, $query, \%initialContext ) 
     
    17541754} 
    17551755 
    1756 =pod 
     1756=begin TML 
    17571757 
    17581758---++ ObjectMethod writeLog( $action, $webTopic, $extra, $user ) 
     
    17951795} 
    17961796 
    1797 =pod 
     1797=begin TML 
    17981798 
    17991799---++ ObjectMethod writeWarning( $text ) 
     
    18101810} 
    18111811 
    1812 =pod 
     1812=begin TML 
    18131813 
    18141814---++ ObjectMethod writeDebug( $text ) 
     
    19621962} 
    19631963 
    1964 =pod 
     1964=begin TML 
    19651965 
    19661966---++ StaticMethod applyPatternToIncludedText( $text, $pattern ) -> $text 
     
    22692269} 
    22702270 
    2271 =pod 
     2271=begin TML 
    22722272 
    22732273---++ ObjectMethod inlineAlert($template, $def, ... ) -> $string 
     
    23142314} 
    23152315 
    2316 =pod 
     2316=begin TML 
    23172317 
    23182318---++ StaticMethod parseSections($text) -> ($string,$sectionlistref) 
     
    24212421} 
    24222422 
    2423 =pod 
     2423=begin TML 
    24242424 
    24252425---++ ObjectMethod expandVariablesOnTopicCreation ( $text, $user, $web, $topic ) -> $text 
     
    25202520} 
    25212521 
    2522 =pod 
     2522=begin TML 
    25232523 
    25242524---++ StaticMethod entityEncode( $text, $extras ) -> $encodedText 
     
    25652565} 
    25662566 
    2567 =pod 
     2567=begin TML 
    25682568 
    25692569---++ StaticMethod entityDecode ( $encodedText ) -> $text 
     
    25812581} 
    25822582 
    2583 =pod 
     2583=begin TML 
    25842584 
    25852585---++ StaticMethod urlEncodeAttachment ( $text ) 
     
    26292629} 
    26302630 
    2631 =pod 
     2631=begin TML 
    26322632 
    26332633---++ StaticMethod urlEncode( $string ) -> encoded string 
     
    26662666} 
    26672667 
    2668 =pod 
     2668=begin TML 
    26692669 
    26702670---++ StaticMethod urlDecode( $string ) -> decoded string 
     
    26822682} 
    26832683 
    2684 =pod 
     2684=begin TML 
    26852685 
    26862686---++ StaticMethod isTrue( $value, $default ) -> $boolean 
     
    27102710} 
    27112711 
    2712 =pod 
     2712=begin TML 
    27132713 
    27142714---++ StaticMethod spaceOutWikiWord( $word, $sep ) -> $string 
     
    27282728} 
    27292729 
    2730 =pod 
     2730=begin TML 
    27312731 
    27322732---++ ObjectMethod expandAllTags(\$text, $topic, $web, $meta) 
     
    29872987} 
    29882988 
    2989 =pod 
     2989=begin TML 
    29902990 
    29912991---++ ObjectMethod enterContext( $id, $val ) 
     
    30163016} 
    30173017 
    3018 =pod 
     3018=begin TML 
    30193019 
    30203020---++ ObjectMethod leaveContext( $id ) 
     
    30323032} 
    30333033 
    3034 =pod 
     3034=begin TML 
    30353035 
    30363036---++ ObjectMethod inContext( $id ) 
     
    30463046} 
    30473047 
    3048 =pod 
     3048=begin TML 
    30493049 
    30503050---++ StaticMethod registerTagHandler( $tag, $fnref ) 
     
    30643064} 
    30653065 
    3066 =pod= 
     3066=begin TML= 
    30673067 
    30683068---++ StaticMethod registerRESTHandler( $subject, $verb, \&fn ) 
     
    30933093} 
    30943094 
    3095 =pod 
     3095=begin TML 
    30963096 
    30973097---++ ObjectMethod handleCommonTags( $text, $web, $topic, $meta ) -> $text 
     
    31713171} 
    31723172 
    3173 =pod 
     3173=begin TML 
    31743174 
    31753175---++ ObjectMethod ADDTOHEAD( $args ) 
     
    32823282} 
    32833283 
    3284 =pod 
     3284=begin TML 
    32853285 
    32863286---+++ %<nop}RENDERHEAD% 
     
    32993299} 
    33003300 
    3301 =pod 
     3301=begin TML 
    33023302 
    33033303---++ StaticMethod initialize( $pathInfo, $remoteUser, $topic, $url, $query ) -> ($topicName, $webName, $scriptUrlPath, $userName, $dataDir) 
     
    33463346} 
    33473347 
    3348 =pod 
     3348=begin TML 
    33493349 
    33503350---++ StaticMethod readFile( $filename ) -> $text 
     
    33693369} 
    33703370 
    3371 =pod 
     3371=begin TML 
    33723372 
    33733373---++ StaticMethod expandStandardEscapes($str) -> $unescapedStr 
     
    45134513    local $/ = "\n"; 
    45144514    while ( my $line = <PMFILE> ) { 
    4515         if ( $line =~ /^=(begin|pod)/ ) { 
     4515        if ( $line =~ /^=(begin (twiki|TML|html)|pod)/ ) { 
    45164516            $inPod = 1; 
    45174517        } 
  • trunk/core/lib/Foswiki/Access.pm

    r1039 r1041  
    2424# As per the GPL, removal of this notice is prohibited. 
    2525 
    26 =pod 
     26=begin TML 
    2727 
    2828---+ package Foswiki::Access 
     
    4040sub MONITOR { 0 } 
    4141 
    42 =pod 
     42=begin TML 
    4343 
    4444---++ ClassMethod new($session) 
     
    7171} 
    7272 
    73 =pod 
     73=begin TML 
    7474 
    7575---++ ObjectMethod getReason() -> $string 
     
    8686} 
    8787 
    88 =pod 
     88=begin TML 
    8989 
    9090---++ ObjectMethod checkAccessPermission( $action, $user, $text, $meta, $topic, $web ) -> $boolean 
  • trunk/core/lib/Foswiki/AccessControlException.pm

    r1039 r1041  
    11# See bottom of file for license and copyright information 
    2 =pod TML 
     2 
     3=begin TML 
    34 
    45---+ package Foswiki::AccessControlException 
     
    1819user is not logged in) or reported (if they are and just don't have access). 
    1920 
     21API version $Date$ (revision $Rev$) 
     22 
     23*Since* _date_ indicates where functions or parameters have been added since 
     24the baseline of the API (TWiki release 4.2.3). The _date_ indicates the 
     25earliest date of a Foswiki release that will support that function or 
     26parameter. 
     27 
     28*Deprecated* _date_ indicates where a function or parameters has been 
     29[[http://en.wikipedia.org/wiki/Deprecation][deprecated]]. Deprecated 
     30functions will still work, though they should 
     31_not_ be called in new plugins and should be replaced in older plugins 
     32as soon as possible. Deprecated parameters are simply ignored in Foswiki 
     33releases after _date_. 
     34 
     35*Until* _date_ indicates where a function or parameter has been removed. 
     36The _date_ indicates the latest date at which Foswiki releases still supported 
     37the function or parameter. 
     38 
    2039=cut 
     40 
     41# THIS PACKAGE IS PART OF THE PUBLISHED API USED BY EXTENSION AUTHORS. 
     42# DO NOT CHANGE THE EXISTING APIS (well thought out extensions are OK) 
     43# AND ENSURE ALL POD DOCUMENTATION IS COMPLETE AND ACCURATE. 
    2144 
    2245package Foswiki::AccessControlException; 
     
    2548use strict; 
    2649 
    27 =pod 
     50our $VERSION = '$Rev$'; 
     51 
     52=begin TML 
    2853 
    2954---+ ClassMethod new($mode, $user, $web, $topic, $reason) 
     
    5277} 
    5378 
    54 =pod 
     79=begin TML 
    5580 
    5681---++ ObjectMethod stringify() -> $string 
  • trunk/core/lib/Foswiki/AggregateIterator.pm

    r830 r1041  
    11# See bottom of file for license and copyright information 
    2 =pod 
     2=begin TML 
    33 
    44---+ package Foswiki::AggregateIterator 
     
    1212use strict; 
    1313 
    14 =pod 
     14=begin TML 
    1515 
    1616---++ new(\@list, $unique) 
     
    4242} 
    4343 
    44 =pod 
     44=begin TML 
    4545 
    4646---++ hasNext() -> $boolean 
     
    9393} 
    9494 
    95 =pod 
     95=begin TML 
    9696 
    9797---++ next() -> $data 
  • trunk/core/lib/Foswiki/Attach.pm

    r1039 r1041  
    1919use Assert; 
    2020 
    21 =pod 
     21=begin TML 
    2222 
    2323---++ ClassMethod new($session) 
     
    4949} 
    5050 
    51 =pod 
     51=begin TML 
    5252 
    5353---++ ObjectMethod renderMetaData( $web, $topic, $meta, $args ) -> $text 
     
    101101} 
    102102 
    103 =pod 
     103=begin TML 
    104104 
    105105---++ ObjectMethod formatVersions ( $web, $topic, $attrs ) -> $text 
     
    259259} 
    260260 
    261 =pod 
     261=begin TML 
    262262 
    263263---++ ObjectMethod getAttachmentLink( $user, $web, $topic, $name, $meta ) -> $html 
  • trunk/core/lib/Foswiki/Attrs.pm

    r830 r1041  
    11# See bottom of file for license and copyright information 
    22 
    3 =pod 
     3=begin TML 
    44 
    55---+ package Foswiki::Attrs 
     
    2121to =new=. 
    2222 
    23 =cut 
     23API version $Date$ (revision $Rev$) 
     24 
     25*Since* _date_ indicates where functions or parameters have been added since 
     26the baseline of the API (TWiki release 4.2.3). The _date_ indicates the 
     27earliest date of a Foswiki release that will support that function or 
     28parameter. 
     29 
     30*Deprecated* _date_ indicates where a function or parameters has been 
     31[[http://en.wikipedia.org/wiki/Deprecation][deprecated]]. Deprecated 
     32functions will still work, though they should 
     33_not_ be called in new plugins and should be replaced in older plugins 
     34as soon as possible. Deprecated parameters are simply ignored in Foswiki 
     35releases after _date_. 
     36 
     37*Until* _date_ indicates where a function or parameter has been removed. 
     38The _date_ indicates the latest date at which Foswiki releases still supported 
     39the function or parameter. 
     40 
     41=cut 
     42 
     43# THIS PACKAGE IS PART OF THE PUBLISHED API USED BY EXTENSION AUTHORS. 
     44# DO NOT CHANGE THE EXISTING APIS (well thought out extensions are OK) 
     45# AND ENSURE ALL POD DOCUMENTATION IS COMPLETE AND ACCURATE. 
    2446 
    2547package Foswiki::Attrs; 
     
    2850use Assert; 
    2951 
    30 use vars qw( $ERRORKEY $DEFAULTKEY $RAWKEY ); 
    31  
    32 $ERRORKEY   = '_ERROR'; 
    33 $DEFAULTKEY = '_DEFAULT'; 
    34 $RAWKEY     = '_RAW'; 
    35  
    36 =pod 
    37  
    38 ---++ ClassMethod new ($string, $friendly) => \%attrsObjectRef 
     52our $VERSION = '$Rev$'; 
     53 
     54our $ERRORKEY   = '_ERROR'; 
     55our $DEFAULTKEY = '_DEFAULT'; 
     56our $RAWKEY     = '_RAW'; 
     57 
     58=begin TML 
     59 
     60---++ ClassMethod new ($string) => \%attrsObjectRef 
    3961 
    4062   * =$string= - String containing attribute specification 
    41    * =$friendly= - if true, the parse will be according to the extended syntax pioneered by the original Contrib::Attrs. Otherwise it will be strict as per traditional syntax. 
    4263 
    4364Parse a standard attribute string containing name=value pairs and create a new 
     
    4667set in the new object. $attrs->{_RAW} will always contain the full unprocessed 
    4768$string. 
    48  
    49 Extended syntax example: 
    50 <verbatim> 
    51 my $attrs = new Foswiki::Attrs('the="time \\"has come", "the walrus" said to=speak of=\'many \\'things\', 1); 
    52 </verbatim> 
    53 In this example: 
    54    * =the= will be =time "has come= 
    55    * <code>_<nop>_<nop>default__</code> will be =the walrus= 
    56    * =said= will be =on= 
    57    * =to= will be =speak= 
    58    * =of= will be =many 'things= 
    59  
    60 Only " and ' are escaped. 
    61  
    62 Traditional syntax is as old TWiki, except that the whole string is parsed 
    63 (the old parser would only recognise default values in position 1, nowhere 
    64 else) 
    6569 
    6670=cut 
     
    142146} 
    143147 
    144 =pod 
     148=begin TML 
    145149 
    146150---++ ObjectMethod isEmpty() -> boolean 
     
    159163} 
    160164 
    161 =pod 
     165=begin TML 
    162166 
    163167---++ ObjectMethod remove($key) -> $value 
     
    176180} 
    177181 
    178 =pod 
     182=begin TML 
    179183 
    180184---++ ObjectMethod stringify() -> $string 
  • trunk/core/lib/Foswiki/Compatibility.pm

    r830 r1041  
    44use Assert; 
    55 
    6 =pod 
     6=begin TML 
    77 
    88---+ package Foswiki::Compatibility 
     
    104104} 
    105105 
    106 =pod 
     106=begin TML 
    107107 
    108108---++ StaticMethod upgradeCategoryTable( $session, $web, $topic, $meta, $text ) -> $text 
     
    258258} 
    259259 
    260 =pod 
     260=begin TML 
    261261 
    262262---++ migrateToFileAttachmentMacro ( $session, $meta, $text  ) -> $text 
     
    318318} 
    319319 
    320 =pod 
     320=begin TML 
    321321 
    322322---++ upgradeFrom1v0beta ( $session, $meta  ) -> $text 
  • trunk/core/lib/Foswiki/Configure/Load.pm

    r836 r1041  
    11# See bottom of file for license and copyright information 
    22 
    3 =pod 
     3=begin TML 
    44 
    55---+ package Foswiki::Configure::Load 
     
    1717our $TRUE = 1; 
    1818 
    19 =pod 
     19=begin TML 
    2020 
    2121---++ StaticMethod readConfig() 
     
    101101} 
    102102 
    103 =pod 
     103=begin TML 
    104104 
    105105---++ StaticMethod expandValue($string) -> $boolean 
     
    118118} 
    119119 
    120 =pod 
     120=begin TML 
    121121 
    122122---++ StaticMethod readDefaults() -> \@errors 
  • trunk/core/lib/Foswiki/Configure/UIs/EXTEND.pm

    r830 r1041  
    260260} 
    261261 
    262 =pod 
     262=begin TML 
    263263 
    264264---++ StaticMethod _unpackArchive($archive [,$dir] ) 
  • trunk/core/lib/Foswiki/Engine.pm

    r1039 r1041  
    11# See bottom of file for license and copyright information 
    2 =pod 
     2=begin TML 
    33 
    44---+!! package Foswiki::Engine 
  • trunk/core/lib/Foswiki/EngineException.pm

    r1039 r1041  
    11# See bottom of file for license and copyright information 
    2 =pod TML 
     2=begin TML 
    33 
    44---+ package Foswiki::EngineException 
     
    1616use strict; 
    1717 
    18 =pod 
     18=begin TML 
    1919 
    2020---+ ClassMethod new( $status, $reason [, $response] ) 
     
    3939} 
    4040 
    41 =pod 
     41=begin TML 
    4242 
    4343---++ ObjectMethod stringify() -> $string 
  • trunk/core/lib/Foswiki/Form.pm

    r1039 r1041  
    11# See bottom of file for license and copyright details 
    22 
    3 =pod 
     3=begin TML 
    44 
    55---+ package Foswiki::Form 
     
    4242  originalrev skin templatetopic text topic topicparent user ); 
    4343 
    44 =pod 
     44=begin TML 
    4545 
    4646---++ ClassMethod new ( $session, $web, $form, \@def ) 
     
    129129} 
    130130 
    131 =pod 
     131=begin TML 
    132132 
    133133---++ StaticMethod fieldTitle2FieldName($title) -> $name 
     
    309309} 
    310310 
    311 =pod 
     311=begin TML 
    312312 
    313313---++ ObjectMethod renderForEdit( $web, $topic, $meta ) -> $html 
     
    412412} 
    413413 
    414 =pod 
     414=begin TML 
    415415 
    416416---++ ObjectMethod renderHidden( $meta ) -> $html 
     
    434434} 
    435435 
    436 =pod 
     436=begin TML 
    437437 
    438438---++ ObjectMethod getFieldValuesFromQuery($query, $metaObject) -> ( $seen, \@missing ) 
     
    478478} 
    479479 
    480 =pod 
     480=begin TML 
    481481 
    482482---++ ObjectMethod isTextMergeable( $name ) -> $boolean 
     
    502502} 
    503503 
    504 =pod 
     504=begin TML 
    505505 
    506506---++ ObjectMethod getField( $name ) -> $fieldDefinition 
     
    521521} 
    522522 
    523 =pod 
     523=begin TML 
    524524 
    525525---++ ObjectMethod getFields() -> \@fields 
  • trunk/core/lib/Foswiki/Form/FieldDefinition.pm

    r1039 r1041  
    22# base class for all form field types 
    33 
    4 =pod 
     4=begin TML 
    55 
    66---+ package Foswiki::Form::FieldDefinition 
     
    1919use Assert; 
    2020 
    21 =pod 
     21=begin TML 
    2222 
    2323---++ ClassMethod new(%...) 
     
    6363} 
    6464 
    65 =pod 
     65=begin TML 
    6666 
    6767---++ isEditable() -> $boolean 
     
    7474sub isEditable { 1 } 
    7575 
    76 =pod 
     76=begin TML 
    7777 
    7878---++ isMultiValued() -> $boolean 
     
    8585sub isMultiValued { 0 } 
    8686 
    87 =pod 
     87=begin TML 
    8888 
    8989---++ isTextMergeable() -> $boolean 
     
    9696sub isTextMergeable { return !shift->isMultiValued() } 
    9797 
    98 =pod 
     98=begin TML 
    9999 
    100100---++ isMandatory() -> $boolean 
     
    106106sub isMandatory { return shift->{attributes} =~ /M/ } 
    107107 
    108 =pod 
     108=begin TML 
    109109 
    110110---++ renderForEdit( $web, $topic, $value ) -> ($col0html, $col1html) 
     
    134134} 
    135135 
    136 =pod 
     136=begin TML 
    137137 
    138138---++ cssClasses(@classes) -> $classes 
     
    151151} 
    152152 
    153 =pod 
     153=begin TML 
    154154 
    155155---++ getDefaultValue() -> $value 
     
    172172} 
    173173 
    174 =pod 
     174=begin TML 
    175175 
    176176---++ renderHidden($meta) -> $html 
     
    208208} 
    209209 
    210 =pod 
     210=begin TML 
    211211 
    212212---++ populateMetaDataFromQuery( $query, $meta, $old ) -> ($bValid, $bPresent) 
     
    310310} 
    311311 
    312 =pod 
     312=begin TML 
    313313 
    314314---++ ObjectMethod renderForDisplay($format, $attrs) -> $html 
  • trunk/core/lib/Foswiki/Form/ListFieldDefinition.pm

    r1039 r1041  
    11# See bottom of file for license and copyright details 
    22 
    3 =pod 
     3=begin TML 
    44 
    55---++ package Foswiki::Form::ListFieldDefinition 
  • trunk/core/lib/Foswiki/Form/Select.pm

    r1039 r1041  
    2525} 
    2626 
    27 =pod 
     27=begin TML 
    2828 
    2929---++ getDefaultValue() -> $value 
  • trunk/core/lib/Foswiki/Func.pm

    r966 r1041  
    11# See bottom of file for license and copyright information 
    22 
    3 =pod 
     3=begin TML 
    44 
    55---+ package Foswiki::Func 
    66 
    7 <!-- STARTINCLUDE required for huge CompleteDocumentation topic --> 
    8 %STARTINCLUDE% 
    9  
    10 _Official Foswiki interface for Plugin developers_ 
    11  
    12 This module defines the interfaces that [[%SYSTEMWEB%.Plugins][Plugins]] 
     7_Interface for Foswiki extensions developers_ 
     8 
     9This module defines the main interfaces that extensions 
    1310can use to interact with the Foswiki engine and content. 
    1411 
     
    1613and starter documentation on how to write a Plugin. 
    1714 
    18 Plugins should *only* use functions described here. If you use 
    19 functions in other Foswiki libraries you might create a security hole and 
     15Plugins should *only* call methods in packages documented in 
     16System.DevelopingPlugins. If you use 
     17functions in other Foswiki libraries you risk creating a security hole, and 
    2018you will probably need to change your plugin when you upgrade Foswiki. 
    2119 
    22 Deprecated functions will still work in older code, though they should 
     20%TOC% 
     21 
     22API version $Date$ (revision $Rev$) 
     23 
     24*Since* _date_ indicates where functions or parameters have been added since 
     25the baseline of the API (TWiki release 4.2.3). The _date_ indicates the 
     26earliest date of a Foswiki release that will support that function or 
     27parameter. 
     28 
     29*Deprecated* _date_ indicates where a function or parameters has been 
     30[[http://en.wikipedia.org/wiki/Deprecation][deprecated]]. Deprecated 
     31functions will still work, though they should 
    2332_not_ be called in new plugins and should be replaced in older plugins 
    24 as soon as possible. 
    25  
    26 The compatibility history of this module is given by the VERSION number 
    27 of the Foswiki::Plugins module. 
    28  
    29 Notes on use of =$Foswiki::Plugins::VERSION=: 
    30    * If the *major* version (e.g. =1.=) is the same then any plugin coded 
    31      to use any *earlier* revision of the =1.= API will still work. No 
    32      function has been removed from the interface, nor has any API published 
    33      in that version changed in such a way as to *require* plugins to be 
    34      recoded. 
    35    * If the *minor* version (e.g. =1.1.=) is incremented there may be changes 
    36      in the API that may help improve the coding of some plugins - for 
    37      example, new interfaces giving access to previously hidden core functions. 
    38      In addition, *deprecation* of functions in the interface trigger a minor 
    39      version increment. Note that deprecated functions are not _removed_, they 
    40      are merely frozen, and plugin authors are recommended to stop using them. 
    41    * Any additional digits in the version number relate to minor changes, such 
    42      as the addition of parameters to the existing functions, or addition of 
    43      utility functions that are unlikely to require significant changes to 
    44      existing plugins. 
    45    * =$Foswiki::Plugins::VERSION= also applies to the plugin handlers. The 
    46      handlers are documented in the !EmptyPlugin, and that module indicates 
    47      what version of =Foswiki::Plugins::VERSION= it relates to. 
    48  
    49 =cut 
     33as soon as possible. Deprecated parameters are simply ignored in Foswiki 
     34releases after _date_. 
     35 
     36*Until* _date_ indicates where a function or parameter has been removed. 
     37The _date_ indicates the latest date at which Foswiki releases still supported 
     38the function or parameter. 
     39 
     40=cut 
     41 
     42# THIS PACKAGE IS PART OF THE PUBLISHED API USED BY EXTENSION AUTHORS. 
     43# DO NOT CHANGE THE EXISTING APIS (well thought out extensions are OK) 
     44# AND ENSURE ALL POD DOCUMENTATION IS COMPLETE AND ACCURATE. 
     45# 
     46# Deprecated functions should not be removed, but should be moved to to the 
     47# deprecated functions section. 
    5048 
    5149package Foswiki::Func; 
     
    5856require Foswiki::Plugins; 
    5957 
    60 =pod 
     58=begin TML 
    6159 
    6260---++ Environment 
     
    6462=cut 
    6563 
    66 =pod 
     64=begin TML 
    6765 
    6866---+++ getSkin( ) -> $skin 
     
    7270Return: =$skin= Comma-separated list of skins, e.g. ='gnu,tartan'=. Empty string if none. 
    7371 
    74 *Since:* Foswiki::Plugins::VERSION 1.000 (29 Jul 2001) 
    75  
    7672=cut 
    7773 
     
    8278} 
    8379 
    84 =pod 
     80=begin TML 
    8581 
    8682---+++ getUrlHost( ) -> $host 
     
    9086Return: =$host= URL host, e.g. ="http://example.com:80"= 
    9187 
    92 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    93  
    9488=cut 
    9589 
     
    10094} 
    10195 
    102 =pod 
     96=begin TML 
    10397 
    10498---+++ getScriptUrl( $web, $topic, $script, ... ) -> $url 
     
    112106Return: =$url=       URL, e.g. ="http://example.com:80/cgi-bin/view.pl/Main/WebNotify"= 
    113107 
    114 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    115  
    116108=cut 
    117109 
     
    126118} 
    127119 
    128 =pod 
     120=begin TML 
    129121 
    130122---+++ getViewUrl( $web, $topic ) -> $url 
     
    135127Return: =$url=      URL, e.g. ="http://example.com:80/cgi-bin/view.pl/Main/WebNotify"= 
    136128 
    137 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    138  
    139129=cut 
    140130 
     
    147137} 
    148138 
    149 =pod 
     139=begin TML 
    150140 
    151141---+++ getPubUrlPath( ) -> $path 
     
    154144 
    155145Return: =$path= URL path of pub directory, e.g. ="/pub"= 
    156  
    157 *Since:* Foswiki::Plugins::VERSION 1.000 (14 Jul 2001) 
    158146 
    159147=cut 
     
    163151} 
    164152 
    165 =pod 
     153=begin TML 
    166154 
    167155---+++ getExternalResource( $url ) -> $response 
     
    210198</verbatim> 
    211199 
    212 *Since:* Foswiki::Plugins::VERSION 1.2 
    213  
    214200=cut 
    215201 
     
    222208} 
    223209 
    224 =pod 
     210=begin TML 
    225211 
    226212---+++ getCgiQuery( ) -> $query 
     
    230216Return: =$query= CGI query object; or 0 if script is called as a shell script 
    231217 
    232 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    233  
    234218=cut 
    235219 
     
    239223} 
    240224 
    241 =pod 
     225=begin TML 
    242226 
    243227---+++ getSessionKeys() -> @keys 
     
    246230Session keys are stored and retrieved using =setSessionValue= and 
    247231=getSessionValue=. 
    248  
    249 *Since:* Foswiki::Plugins::VERSION 1.2 
    250232 
    251233=cut 
     
    258240} 
    259241 
    260 =pod 
     242=begin TML 
    261243 
    262244---+++ getSessionValue( $key ) -> $value 
     
    266248Return: =$value=  Value associated with key; empty string if not set 
    267249 
    268 *Since:* Foswiki::Plugins::VERSION 1.000 (27 Feb 200) 
    269  
    270250=cut 
    271251 
     
    279259} 
    280260 
    281 =pod 
     261=begin TML 
    282262 
    283263---+++ setSessionValue( $key, $value ) -> $boolean 
     
    288268Return: true if function succeeded 
    289269 
    290 *Since:* Foswiki::Plugins::VERSION 1.000 (17 Aug 2001) 
    291  
    292270=cut 
    293271 
     
    300278} 
    301279 
    302 =pod 
     280=begin TML 
    303281 
    304282---+++ clearSessionValue( $key ) -> $boolean 
     
    309287Return: true if the session value was cleared 
    310288 
    311 *Since:* Foswiki::Plugins::VERSION 1.1 
    312  
    313289=cut 
    314290 
     
    320296} 
    321297 
    322 =pod 
     298=begin TML 
    323299 
    324300---+++ getContext() -> \%hash 
     
    365341working, the context ID 'FirstPlugin' will be set. 
    366342 
    367 *Since:* Foswiki::Plugins::VERSION 1.1 
    368  
    369343=cut 
    370344 
     
    374348} 
    375349 
    376 =pod 
     350=begin TML 
    377351 
    378352---+++ pushTopicContext($web, $topic) 
     
    391365global variables to remember the web and topic in =initPlugin=, then those 
    392366values will be unchanged. 
    393  
    394 *Since:* Foswiki::Plugins::VERSION 1.2 
    395367 
    396368=cut 
     
    415387} 
    416388 
    417 =pod 
     389=begin TML 
    418390 
    419391---+++ popTopicContext() 
     
    421393Returns the Foswiki context to the state it was in before the 
    422394=pushTopicContext= was called. 
    423  
    424 *Since:* Foswiki::Plugins::VERSION 1.2 
    425395 
    426396=cut 
     
    436406} 
    437407 
    438 =pod 
     408=begin TML 
    439409 
    440410---++ Preferences 
     
    442412=cut 
    443413 
    444 =pod 
     414=begin TML 
    445415 
    446416---+++ getPreferencesValue( $key, $web ) -> $value 
     
    450420   * =$web= - Name of web, optional. Current web if not specified; does not apply to settings of Plugin topics 
    451421Return: =$value=  Preferences value; empty string if not set 
    452  
    453 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    454422 
    455423   * Example for Plugin setting: 
     
    479447} 
    480448 
    481 =pod 
     449=begin TML 
    482450 
    483451---+++ getPluginPreferencesValue( $key ) -> $value 
     
    488456 
    489457__Note__: This function will will *only* work when called from the Plugin.pm file itself. it *will not work* if called from a sub-package (e.g. Foswiki::Plugins::MyPlugin::MyModule) 
    490  
    491 *Since:* Foswiki::Plugins::VERSION 1.021 (27 Mar 2004) 
    492458 
    493459*NOTE:* If =$NO_PREFS_IN_TOPIC= is enabled in the plugin, then 
     
    505471} 
    506472 
    507 =pod 
     473=begin TML 
    508474 
    509475---+++ getPreferencesFlag( $key, $web ) -> $value 
     
    514480Return: =$value=  Preferences flag ='1'= (if set), or ="0"= (for preferences values ="off"=, ="no"= and ="0"=) 
    515481 
    516 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    517  
    518482   * Example for Plugin setting: 
    519483      * MyPlugin topic has: =* Set SHOWHELP = off= 
     
    533497} 
    534498 
    535 =pod 
     499=begin TML 
    536500 
    537501---+++ getPluginPreferencesFlag( $key ) -> $boolean 
     
    542506 
    543507__Note__: This function will will *only* work when called from the Plugin.pm file itself. it *will not work* if called from a sub-package (e.g. Foswiki::Plugins::MyPlugin::MyModule) 
    544  
    545 *Since:* Foswiki::Plugins::VERSION 1.021 (27 Mar 2004) 
    546508 
    547509*NOTE:* If =$NO_PREFS_IN_TOPIC= is enabled in the plugin, then 
     
    557519} 
    558520 
    559 =pod 
     521=begin TML 
    560522 
    561523---+++ setPreferencesValue($name, $val) 
     
    576538} 
    577539 
    578 =pod 
     540=begin TML 
    579541 
    580542---++ User Handling and Access Control 
     
    584546Return: =$loginName= Default user name, e.g. ='guest'= 
    585547 
    586 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    587  
    588548=cut 
    589549 
     
    592552} 
    593553 
    594 =pod 
     554=begin TML 
    595555 
    596556---+++ getCanonicalUserID( $user ) -> $cUID 
     
    608568registered users. This may be autogenerated for an authenticated but 
    609569unregistered user. 
    610  
    611 *Since:* Foswiki::Plugins::VERSION 1.2 
    612570 
    613571=cut 
     
    633591} 
    634592 
    635 =pod 
     593=begin TML 
    636594 
    637595---+++ getWikiName( $user ) -> $wikiName 
     
    643601 
    644602Return: =$wikiName= Wiki Name, e.g. ='JohnDoe'= 
    645  
    646 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    647603 
    648604=cut 
     
    660616} 
    661617 
    662 =pod  
     618=begin TML  
    663619  
    664620---+++ getWikiUserName( $user ) -> $wikiName 
     
    670626 
    671627Return: =$wikiName= Wiki Name, e.g. ="Main.JohnDoe"= 
    672  
    673 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    674628 
    675629=cut 
     
    687641} 
    688642 
    689 =pod 
     643=begin TML 
    690644 
    691645---+++ wikiToUserName( $id ) -> $loginName 
    692646Translate a Wiki name to a login name. 
    693647   * =$id= - Wiki name, e.g. ='Main.JohnDoe'= or ='JohnDoe'=. 
    694      Since TWiki 4.2.1, $id may also be a login name. This will normally 
     648     $id may also be a login name. This will normally 
    695649     be transparent, but should be borne in mind if you have login names 
    696650     that are also legal wiki names. 
     
    704658 
    705659returns undef if the WikiName is not found. 
    706  
    707 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    708660 
    709661=cut  
     
    723675} 
    724676 
    725 =pod 
     677=begin TML 
    726678 
    727679---+++ userToWikiName( $loginName, $dontAddWeb ) -> $wikiName 
     
    735687userToWikiName will always return a name. If the user does not 
    736688exist in the mapping, the $loginName parameter is returned. (backward compatibility) 
    737  
    738 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    739689 
    740690=cut 
     
    755705} 
    756706 
    757 =pod 
     707=begin TML 
    758708 
    759709---+++ emailToWikiNames( $email, $dontAddWeb ) -> @wikiNames 
     
    763713registered address. Since several users could register with the same email 
    764714address, this returns a list of wikinames rather than a single wikiname. 
    765  
    766 *Since:* Foswiki::Plugins::VERSION 1.2 
    767715 
    768716=cut 
     
    789737} 
    790738 
    791 =pod 
     739=begin TML 
    792740 
    793741---+++ wikinameToEmails( $user ) -> @emails 
     
    797745 
    798746$user may also be a login name, or the name of a group. 
    799  
    800 *Since:* Foswiki::Plugins::VERSION 1.2 
    801747 
    802748=cut 
     
    825771} 
    826772 
    827 =pod 
     773=begin TML 
    828774 
    829775---+++ isGuest( ) -> $boolean 
    830776 
    831777Test if logged in user is a guest (WikiGuest) 
    832  
    833 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    834778 
    835779=cut 
     
    841785} 
    842786 
    843 =pod 
     787=begin TML 
    844788 
    845789---+++ isAnAdmin( $id ) -> $boolean 
     
    848792the currently logged-in user is assumed. 
    849793   * $id can be either a login name or a WikiName 
    850  
    851 *Since:* Foswiki::Plugins::VERSION 1.2 
    852794 
    853795=cut 
     
    859801} 
    860802 
    861 =pod 
     803=begin TML 
    862804 
    863805---+++ isGroupMember( $group, $id ) -> $boolean 
     
    872814 
    873815   * $id can be a login name or a WikiName 
    874  
    875 *Since:* Foswiki::Plugins::VERSION 1.2 
    876816 
    877817=cut 
     
    894834} 
    895835 
    896 =pod 
     836=begin TML 
    897837 
    898838---+++ eachUser() -> $iterator 
     
    910850 
    911851*WARNING* on large sites, this could be a long list! 
    912  
    913 *Since:* Foswiki::Plugins::VERSION 1.2 
    914852 
    915853=cut 
     
    923861} 
    924862 
    925 =pod 
     863=begin TML 
    926864 
    927865---+++ eachMembership($id) -> $iterator 
     
    929867     If =$id= is =undef=, defaults to the currently logged-in user. 
    930868Get an iterator over the names of all groups that the user is a member of. 
    931  
    932 *Since:* Foswiki::Plugins::VERSION 1.2 
    933869 
    934870=cut 
     
    950886} 
    951887 
    952 =pod 
     888=begin TML 
    953889 
    954890---+++ eachGroup() -> $iterator 
     
    966902*WARNING* on large sites, this could be a long list! 
    967903 
    968 *Since:* Foswiki::Plugins::VERSION 1.2 
    969  
    970904=cut 
    971905 
     
    976910} 
    977911 
    978 =pod 
     912=begin TML 
    979913 
    980914---+++ isGroup( $group ) -> $boolean 
     
    990924} 
    991925 
    992 =pod 
     926=begin TML 
    993927 
    994928---+++ eachGroupMember($group) -> $iterator 
     
    1006940 
    1007941*WARNING* on large sites, this could be a long list! 
    1008  
    1009 *Since:* Foswiki::Plugins::VERSION 1.2 
    1010942 
    1011943=cut 
     
    1023955} 
    1024956 
    1025 =pod 
     957=begin TML 
    1026958 
    1027959---+++ checkAccessPermission( $type, $id, $text, $topic, $web, $meta ) -> $boolean 
     
    1057989in =ThatWeb.ThisTopic=, then a call to =checkAccessPermissions('SPIN', 'IncyWincy', undef, 'ThisTopic', 'ThatWeb', undef)= will return =true=. 
    1058990 
    1059 *Since:* Foswiki::Plugins::VERSION 1.000 (27 Feb 2001) 
    1060  
    1061991=cut 
    1062992 
     
    10721002} 
    10731003 
    1074 =pod 
     1004=begin TML 
    10751005 
    10761006---++ Webs, Topics and Attachments 
     
    10781008=cut 
    10791009 
    1080 =pod 
     1010=begin TML 
    10811011 
    10821012---+++ getListOfWebs( $filter [, $web] ) -> @webs 
     
    10981028</verbatim> 
    10991029 
    1100 *Since:* Foswiki::Plugins::VERSION 1.1 
    1101  
    11021030=cut 
    11031031 
     
    11071035} 
    11081036 
    1109 =pod 
     1037=begin TML 
    11101038 
    11111039---+++ webExists( $web ) -> $boolean 
     
    11141042   * =$web= - Web name, required, e.g. ='Sandbox'= 
    11151043 
    1116 *Since:* Foswiki::Plugins::VERSION 1.000 (14 Jul 2001) 
    1117  
    11181044=cut 
    11191045 
     
    11251051} 
    11261052 
    1127 =pod 
     1053=begin TML 
    11281054 
    11291055---+++ createWeb( $newWeb, $baseWeb, $opts ) 
     
    11511077</verbatim> 
    11521078 
    1153 *Since:* Foswiki::Plugins::VERSION 1.1 
    1154  
    11551079=cut 
    11561080 
     
    11611085} 
    11621086 
    1163 =pod 
     1087=begin TML 
    11641088 
    11651089---+++ moveWeb( $oldName, $newName ) 
     
    11891113</verbatim> 
    11901114 
    1191 *Since:* Foswiki::Plugins::VERSION 1.1 
    1192  
    11931115=cut 
    11941116 
     
    12001122} 
    12011123 
    1202 =pod 
     1124=begin TML 
    12031125 
    12041126---+++ eachChangeSince($web, $time) -> $iterator 
     
    12371159} 
    12381160 
    1239 =pod 
     1161=begin TML 
    12401162 
    12411163---+++ getTopicList( $web ) -> @topics 
     
    12451167Return: =@topics= Topic list, e.g. =( 'WebChanges',  'WebHome', 'WebIndex', 'WebNotify' )= 
    12461168 
    1247 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    1248  
    12491169=cut 
    12501170 
     
    12561176} 
    12571177 
    1258 =pod 
     1178=begin TML 
    12591179 
    12601180---+++ topicExists( $web, $topic ) -> $boolean 
     
    12681188To get an expected behaviour it is recommened to specify the current web for $web; don't leave it empty. 
    12691189 
    1270 *Since:* Foswiki::Plugins::VERSION 1.000 (14 Jul 2001) 
    1271  
    12721190=cut 
    12731191 
     
    12781196} 
    12791197 
    1280 =pod 
     1198=begin TML 
    12811199 
    12821200---+++ checkTopicEditLock( $web, $topic, $script ) -> ( $oopsUrl, $loginName, $unlockTime ) 
     
    12871205Return: =( $oopsUrl, $loginName, $unlockTime )= - The =$oopsUrl= for calling redirectCgiQuery(), user's =$loginName=, and estimated =$unlockTime= in minutes, or ( '', '', 0 ) if no lease exists. 
    12881206   * =$script= The script to invoke when continuing with the edit 
    1289  
    1290 *Since:* Foswiki::Plugins::VERSION 1.010 (31 Dec 2002) 
    12911207 
    12921208=cut 
     
    13271243} 
    13281244 
    1329 =pod 
     1245=begin TML 
    13301246 
    13311247---+++ setTopicEditLock( $web, $topic, $lock ) 
     
    13421258It is *impossible* to fully lock a topic. Concurrent changes will be 
    13431259merged. 
    1344  
    1345 *Since:* Foswiki::Plugins::VERSION 1.010 (31 Dec 2002) 
    13461260 
    13471261=cut 
     
    13621276} 
    13631277 
    1364 =pod 
     1278=begin TML 
    13651279 
    13661280---+++ saveTopic( $web, $topic, $meta, $text, $options ) -> $error 
     
    13771291Return: error message or undef. 
    13781292 
    1379 *Since:* Foswiki::Plugins::VERSION 1.000 (29 Jul 2001) 
    1380  
    13811293For example, 
    13821294<verbatim> 
     
    14011313} 
    14021314 
    1403 =pod 
     1315=begin TML 
    14041316 
    14051317---+++ saveTopicText( $web, $topic, $text, $ignorePermissions, $dontNotify ) -> $oopsUrl 
     
    14141326 
    14151327This method is a lot less efficient and much more dangerous than =saveTopic=. 
    1416  
    1417 *Since:* Foswiki::Plugins::VERSION 1.010 (31 Dec 2002) 
    14181328 
    14191329<verbatim> 
     
    14911401} 
    14921402 
    1493 =pod 
     1403=begin TML 
    14941404 
    14951405---+++ moveTopic( $web, $topic, $newWeb, $newTopic ) 
     
    15061416 
    15071417Rename a topic to the $Foswiki::cfg{TrashWebName} to delete it. 
    1508  
    1509 *Since:* Foswiki::Plugins::VERSION 1.1 
    15101418 
    15111419<verbatim> 
     
    15391447} 
    15401448 
    1541 =pod 
     1449=begin TML 
    15421450 
    15431451---+++ getRevisionInfo($web, $topic, $rev, $attachment ) -> ( $date, $user, $rev, $comment )  
     
    15581466more efficient. 
    15591467 
    1560 *Since:* Foswiki::Plugins::VERSION 1.000 (29 Jul 2001) 
    1561  
    15621468=cut 
    15631469 
     
    15701476} 
    15711477 
    1572 =pod 
     1478=begin TML 
    15731479 
    15741480---+++ getRevisionAtTime( $web, $topic, $time ) -> $rev 
     
    15811487(either because the topic isn't that old, or there was a problem) 
    15821488 
    1583 *Since:* Foswiki::Plugins::VERSION 1.1 
    1584  
    15851489=cut 
    15861490 
     
    15901494} 
    15911495 
    1592 =pod 
     1496=begin TML 
    15931497 
    15941498---+++ readTopic( $web, $topic, $rev ) -> ( $meta, $text ) 
     
    16081512topic. 
    16091513 
    1610 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    1611  
    16121514=cut 
    16131515 
     
    16201522} 
    16211523 
    1622 =pod 
     1524=begin TML 
    16231525 
    16241526---+++ readTopicText( $web, $topic, $rev, $ignorePermissions ) -> $text 
     
    16321534 
    16331535This method is more efficient than =readTopic=, but returns meta-data embedded in the text. Plugins authors must be very careful to avoid damaging meta-data. You are recommended to use readTopic instead, which is a lot safer. 
    1634  
    1635 *Since:* Foswiki::Plugins::VERSION 1.010 (31 Dec 2002) 
    16361536 
    16371537=cut 
     
    16651565} 
    16661566 
    1667 =pod 
     1567=begin TML 
    16681568 
    16691569---+++ attachmentExists( $web, $topic, $attachment ) -> $boolean 
     
    16751575$web and $topic are parsed as described in the documentation for =normalizeWebTopicName=. 
    16761576 
    1677 *Since:* Foswiki::Plugins::VERSION 1.1 
    1678  
    16791577=cut 
    16801578 
     
    16891587} 
    16901588 
    1691 =pod 
     1589=begin TML 
    16921590 
    16931591---+++ readAttachment( $web, $topic, $name, $rev ) -> $data 
     
    17191617</verbatim> 
    17201618 
    1721 *Since:* Foswiki::Plugins::VERSION 1.1 
    1722  
    17231619=cut 
    17241620 
     
    17371633} 
    17381634 
    1739 =pod 
     1635=begin TML 
    17401636 
    17411637---+++ saveAttachment( $web, $topic, $attachment, \%opts ) 
     
    17701666</verbatim> 
    17711667 
    1772 *Since:* Foswiki::Plugins::VERSION 1.1 
    1773  
    17741668=cut 
    17751669 
     
    17901684} 
    17911685 
    1792 =pod 
     1686=begin TML 
    17931687 
    17941688---+++ moveAttachment( $web, $topic, $attachment, $newWeb, $newTopic, $newAttachment ) 
     
    18261720</verbatim> 
    18271721 
    1828 *Since:* Foswiki::Plugins::VERSION 1.1 
    1829  
    18301722=cut 
    18311723 
     
    18471739} 
    18481740 
    1849 =pod 
     1741=begin TML 
    18501742 
    18511743---++ Assembling Pages 
     
    18531745=cut 
    18541746 
    1855 =pod 
     1747=begin TML 
    18561748 
    18571749---+++ readTemplate( $name, $skin ) -> $text 
     
    18621754Return: =$text=    Template text 
    18631755 
    1864 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    1865  
    18661756=cut 
    18671757 
     
    18731763} 
    18741764 
    1875 =pod 
     1765=begin TML 
    18761766 
    18771767---+++ loadTemplate ( $name, $skin, $web ) -> $text 
     
    18821772Return: expanded template text (what's left after removal of all %TMPL:DEF% statements) 
    18831773 
    1884 *Since:* Foswiki::Plugins::VERSION 1.1 
    1885  
    18861774Reads a template and extracts template definitions, adding them to the 
    18871775list of loaded templates, overwriting any previous definition. 
     
    18981786} 
    18991787 
    1900 =pod 
     1788=begin TML 
    19011789 
    19021790---+++ expandTemplate( $def  ) -> $string 
     
    19061794Return: the text of the expanded template 
    19071795 
    1908 *Since:* Foswiki::Plugins::VERSION 1.1 
    1909  
    19101796A template is defined using a %TMPL:DEF% statement in a template 
    19111797file. See the documentation on Foswiki templates for more information. 
     
    19181804} 
    19191805 
    1920 =pod 
     1806=begin TML 
    19211807 
    19221808---+++ writeHeader() 
     
    19241810Prints a basic content-type HTML header for text/html to standard out. 
    19251811 
    1926 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    1927  
    19281812=cut 
    19291813 
     
    19331817} 
    19341818 
    1935 =pod 
     1819=begin TML 
    19361820 
    19371821---+++ redirectCgiQuery( $query, $url, $passthru ) 
     
    19671851Foswiki installation. 
    19681852 
    1969 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    1970  
    19711853=cut 
    19721854 
     
    19771859} 
    19781860 
    1979 =pod 
     1861=begin TML 
    19801862 
    19811863---+++ addToHEAD( $id, $header, $requires ) 
     
    19911873Note that this is _not_ the same as the HTTP header, which is modified through the Plugins =modifyHeaderHandler=. 
    19921874 
    1993 *Since:* Foswiki::Plugins::VERSION 1.1 
    1994  
    1995 example: 
     1875Example: 
    19961876<verbatim> 
    19971877Foswiki::Func::addToHEAD('PATTERN_STYLE','<link id="twikiLayoutCss" rel="stylesheet" type="text/css" href="%PUBURL%/Foswiki/PatternSkin/layout.css" media="all" />'); 
     
    20061886} 
    20071887 
    2008 =pod 
     1888=begin TML 
    20091889 
    20101890---+++ expandCommonVariables( $text, $topic, $web, $meta ) -> $text 
     
    20141894   * =$topic= - Current topic name, e.g. ='WebNotify'= 
    20151895   * =$web=   - Web name, optional, e.g. ='Main'=. The current web is taken if missing 
    2016    * =$meta=  - topic meta-data to use while expanding (Since Foswiki::Plugins::VERSION 1.2) 
     1896   * =$meta=  - topic meta-data to use while expanding 
    20171897Return: =$text=     Expanded text, e.g. ='Current user is <nop>WikiGuest'= 
    2018  
    2019 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    20201898 
    20211899See also: expandVariablesOnTopicCreation 
     
    20321910} 
    20331911 
    2034 =pod 
     1912=begin TML 
    20351913 
    20361914---+++ renderText( $text, $web ) -> $text 
     
    20411919Return: =$text=    XHTML text, e.g. ='&lt;b>bold&lt;/b> and &lt;code>fixed font&lt;/code>'= 
    20421920 
    2043 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    2044  
    20451921=cut 
    20461922 
     
    20521928} 
    20531929 
    2054 =pod 
     1930=begin TML 
    20551931 
    20561932---+++ internalLink( $pre, $web, $topic, $label, $anchor, $createLink ) -> $text 
     
    20651941Return: =$text=          XHTML anchor, e.g. ='&lt;a href='/cgi-bin/view/Main/WebNotify#Jump'>notify&lt;/a>'= 
    20661942 
    2067 *Since:* Foswiki::Plugins::VERSION 1.000 (7 Dec 2002) 
    2068  
    20691943=cut 
    20701944 
     
    20771951} 
    20781952 
    2079 =pod 
     1953=begin TML 
    20801954 
    20811955---++ E-mail 
     
    21041978Leave a blank line between the last header field and the message body. 
    21051979 
    2106 *Since:* Foswiki::Plugins::VERSION 1.1 
    2107  
    21081980=cut 
    21091981 
     
    21151987} 
    21161988 
    2117 =pod 
    2118  
    2119 ---+++ wikiToEmail( $wikiName ) -> $email 
    2120  
    2121    * =$wikiname= - wiki name of the user 
    2122 Get the e-mail address(es) of the named user. If the user has multiple 
    2123 e-mail addresses (for example, the user is a group), then the list will 
    2124 be comma-separated. 
    2125  
    2126 *Since:* Foswiki::Plugins::VERSION 1.1 
    2127  
    2128 *Deprecated* in favour of wikinameToEmails, because this function only 
    2129 returns a single email address, where a user may in fact have several. 
    2130  
    2131 $wikiName may also be a login name. 
    2132  
    2133 =cut 
    2134  
    2135 sub wikiToEmail { 
    2136     my ($user) = @_; 
    2137     my @emails = wikinameToEmails($user); 
    2138     if ( scalar(@emails) ) { 
    2139         return $emails[0]; 
    2140     } 
    2141     return ''; 
    2142 } 
    2143  
    2144 =pod 
     1989=begin TML 
    21451990 
    21461991---++ Creating New Topics 
     
    21481993=cut 
    21491994 
    2150 =pod 
     1995=begin TML 
    21511996 
    21521997---+++ expandVariablesOnTopicCreation ( $text ) -> $text 
     
    21552000   * =$text= - the text to process 
    21562001Return: text with variables expanded 
    2157  
    2158 *Since:* Foswiki::Plugins::VERSION 1.1 
    21592002 
    21602003Expands only the variables expected in templates that must be statically 
     
    21812024} 
    21822025 
    2183 =pod 
     2026=begin TML 
    21842027 
    21852028---++ Special handlers 
     
    21892032=cut 
    21902033 
    2191 =pod= 
     2034=begin TML= 
    21922035 
    21932036---+++ registerTagHandler( $var, \&fn, $syntax ) 
     
    21992042   * =\&fn= - Reference to the handler function. 
    22002043   * =$syntax= can be 'classic' (the default) or 'context-free'. 'classic' syntax is appropriate where you want the variable to support classic syntax i.e. to accept the standard =%<nop>MYVAR{ "unnamed" param1="value1" param2="value2" }%= syntax, as well as an unquoted default parameter, such as =%<nop>MYVAR{unquoted parameter}%=. If your variable will only use named parameters, you can use 'context-free' syntax, which supports a more relaxed syntax. For example, %MYVAR{param1=value1, value 2, param3="value 3", param4='value 5"}% 
    2201  
    2202 *Since:* Foswiki::Plugins::VERSION 1.1 
    22032044 
    22042045The variable handler function must be of the form: 
     
    22582099} 
    22592100 
    2260 =pod= 
     2101=begin TML= 
    22612102 
    22622103---+++ registerRESTHandler( $alias, \&fn, ) 
     
    22672108   * =$alias= - The name . 
    22682109   * =\&fn= - Reference to the function. 
    2269  
    2270 *Since:* Foswiki::Plugins::VERSION 1.1 
    22712110 
    22722111The handler function must be of the form: 
     
    23222161} 
    23232162 
    2324 =pod 
     2163=begin TML 
    23252164 
    23262165---+++ decodeFormatTokens($str) -> $unencodedString 
     
    23522191alphanumeric characters*. You have been warned! 
    23532192 
    2354 *Since:* Foswiki::Plugins::VERSION 1.2 
    2355  
    23562193=cut 
    23572194 
     
    23602197} 
    23612198 
    2362 =pod 
     2199=begin TML 
    23632200 
    23642201---++ Searching 
     
    23662203=cut 
    23672204 
    2368 =pod 
     2205=begin TML 
    23692206 
    23702207---+++ searchInWebContent($searchString, $web, \@topics, \%options ) -> \%map 
     
    23932230</verbatim> 
    23942231 
    2395 *Since:* Foswiki::Plugins::VERSION 1.1 
    2396  
    23972232=cut 
    23982233 
     
    24042239} 
    24052240 
    2406 =pod 
     2241=begin TML 
    24072242 
    24082243---++ Plugin-specific file handling 
     
    24102245=cut 
    24112246 
    2412 =pod 
     2247=begin TML 
    24132248 
    24142249---+++ getWorkArea( $pluginName ) -> $directorypath 
     
    24232258to keep their areas tidy. 
    24242259 
    2425 *Since:* Foswiki::Plugins::VERSION 1.1 (Dec 2005) 
    2426  
    24272260=cut 
    24282261 
     
    24332266} 
    24342267 
    2435 =pod 
     2268=begin TML 
    24362269 
    24372270---+++ readFile( $filename ) -> $text 
     
    24422275 
    24432276__NOTE:__ Use this function only for the Plugin workarea, *not* for topics and attachments. Use the appropriate functions to manipulate topics and attachments. 
    2444  
    2445 *Since:* Foswiki::Plugins::VERSION 1.000 (07 Dec 2002) 
    24462277 
    24472278=cut 
     
    24582289} 
    24592290 
    2460 =pod 
     2291=begin TML 
    24612292 
    24622293---+++ saveFile( $filename, $text ) 
     
    24682299 
    24692300__NOTE:__ Use this function only for the Plugin workarea, *not* for topics and attachments. Use the appropriate functions to manipulate topics and attachments. 
    2470  
    2471 *Since:* Foswiki::Plugins::VERSION 1.000 (07 Dec 2002) 
    24722301 
    24732302=cut 
     
    24832312} 
    24842313 
    2485 =pod 
     2314=begin TML 
    24862315 
    24872316---++ General Utilities 
     
    24892318=cut 
    24902319 
    2491 =pod 
     2320=begin TML 
    24922321 
    24932322---+++ getRegularExpression( $name ) -> $expr 
     
    24962325   * =$name= - Name of the expression to retrieve.  See notes below 
    24972326Return: String or precompiled regular expression matching as described below. 
    2498  
    2499 *Since:* Foswiki::Plugins::VERSION 1.020 (9 Feb 2004) 
    25002327 
    25012328__Note:__ Foswiki internally precompiles several regular expressions to 
     
    25412368} 
    25422369 
    2543 =pod 
     2370=begin TML 
    25442371 
    25452372---+++ normalizeWebTopicName($web, $topic) -> ($web, $topic) 
     
    25492376   * =$topic= - Topic name, may be a web.topic string, required. 
    25502377Return: the parsed Web/Topic pair 
    2551  
    2552 *Since:* Foswiki::Plugins::VERSION 1.1 
    25532378 
    25542379| *Input*                               | *Return*  | 
     
    25792404} 
    25802405 
    2581 =pod 
     2406=begin TML 
    25822407 
    25832408---+++ StaticMethod sanitizeAttachmentName($fname) -> ($fileName, $origName) 
     
    25902415file names to legal server names. 
    25912416 
    2592 *Since:* Foswiki::Plugins::VERSION 1.2 
    2593  
    25942417=cut 
    25952418 
     
    25992422} 
    26002423 
    2601 =pod 
     2424=begin TML 
    26022425 
    26032426---+++ spaceOutWikiWord( $word, $sep ) -> $text 
     
    26062429With parameter $sep any string may be used as separator between the word components; if $sep is undefined it defaults to a space. 
    26072430 
    2608 *Since:* Foswiki::Plugins::VERSION 1.2 
    2609  
    26102431=cut 
    26112432 
     
    26162437} 
    26172438 
    2618 =pod 
     2439=begin TML 
    26192440 
    26202441---+++ writeWarning( $text ) 
     
    26242445Return:            none 
    26252446 
    2626 *Since:* Foswiki::Plugins::VERSION 1.020 (16 Feb 2004) 
    2627  
    26282447=cut 
    26292448 
     
    26372456} 
    26382457 
    2639 =pod 
     2458=begin TML 
    26402459 
    26412460---+++ writeDebug( $text ) 
     
    26452464Return:            none 
    26462465 
    2647 *Since:* Foswiki::Plugins::VERSION 1.020 (16 Feb 2004) 
    2648  
    26492466=cut 
    26502467 
     
    26562473} 
    26572474 
    2658 =pod 
    2659  
    2660 ---+++ formatTime( $time, $format, $timezone ) -> $text 
    2661  
    2662 Format the time in seconds into the desired time string 
    2663    * =$time=     - Time in epoc seconds 
    2664    * =$format=   - Format type, optional. Default e.g. ='31 Dec 2002 - 19:30'=. Can be ='$iso'= (e.g. ='2002-12-31T19:30Z'=), ='$rcs'= (e.g. ='2001/12/31 23:59:59'=, ='$http'= for HTTP header format (e.g. ='Thu, 23 Jul 1998 07:21:56 GMT'=), or any string with tokens ='$seconds, $minutes, $hours, $day, $wday, $month, $mo, $year, $ye, $tz'= for seconds, minutes, hours, day of month, day of week, 3 letter month, 2 digit month, 4 digit year, 2 digit year, timezone string, respectively 
    2665    * =$timezone= - either not defined (uses the displaytime setting), 'gmtime', or 'servertime' 
    2666 Return: =$text=        Formatted time string 
    2667 | Note:                  | if you used the removed formatGmTime, add a third parameter 'gmtime' | 
    2668  
    2669 *Since:* Foswiki::Plugins::VERSION 1.020 (26 Feb 2004) 
    2670  
    2671 =cut 
    2672  
    2673 sub formatTime { 
    2674  
    2675     #   my ( $epSecs, $format, $timezone ) = @_; 
    2676     require Foswiki::Time; 
    2677     return Foswiki::Time::formatTime(@_); 
    2678 } 
    2679  
    2680 =pod 
     2475=begin TML 
    26812476 
    26822477---+++ isTrue( $value, $default ) -> $boolean 
     
    26902485not specified it is taken as 0. 
    26912486