Replace Page



Update a page in the database. A ReplacePage is often, but not alway be proceeded with a RetrievePage.

  sub ReplacePage {
    local($title, *page) = @_;
    local($value, @value);

Adjust standard fields.

    $page{date} = $DateToday;
    $page{host} = $ENV{REMOTE_HOST};
    $page{agent} = $ENV{HTTP_USER_AGENT};
    $page{rev}++;

Encode fields as a string.

    @value = %page;
    $value = join($FieldSeparator, @value);

Save the string in a filesystem directory.

    open (WDB, ">$DataBase.wdb/$title");
    print WDB $value;
    close WDB;

And in the database.

    $db{$title} = $value;
  }

 

Last edited December 19, 1995
Return to WelcomeVisitors