[Home]OpenKeptList

UseModWiki | RecentChanges | Preferences

UseModWiki/Documentation: Functions: OpenKeptList

 Initializes @KeptList by opening the keep file (using &KeepFileName ).
 &KeepFileName returns the $fname which is tested for existence if it is bad,
 &OpenKeptList returns @KeptList as an empty data structure. 
 Otherwise, for the current $OpenPageName and @KeptList is returned
 by breaking out the serialized KeptPages from the file.

 sub OpenKeptList {
   my ($fname, $data);

   @KeptList = ();
   $fname = &KeepFileName();
   return  if (!(-f $fname));
   $data = &ReadFileOrDie($fname);
   @KeptList = split(/$FS1/, $data, -1);  # -1 keeps trailing null fields
 }

UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited July 7, 2007 3:40 am by MarkusLude (diff)
Search: