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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 
Note: See TracChangeset for help on using the changeset viewer.