Michael De La Rue > WWW-Link > WWW::Link::Repair

Download:
WWW-Link-0.036.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Module Version: 1.11   Source  

NAME ^

Repair.pm - repair links in files.

SYNOPSIS ^

    use Repair::Substitutor;
    use Repair;

    $linksubs1 = WWW::Link::Repair::Substitutor::gen_substitutor(
       "http://bounce.com/" ,
       "http://bing.bong/",
       0, 0,
      );
    $filehand = WWW::Link::Repair::Substitutor::gen_simple_file_handler ($linksubs);

    &$filehand("fix-this-file");

    use CDB_File::BiIndex;
    $::index = new CDB_File::BiIndex "page-index-file", "link-index-file";

    WWW::Link::Repair::infostructure($index, $filehand, "http://bounce.com/");

DESCRIPTION ^

This module provides functions that allow the repair of files.

directory(file handler, directory ... )

This function recurses through each given directory argument. For each file found it calls the file handler function.

The file handler should be a function which can be called on a filename and will update that file with the new URL.

oldurl is the base URL which should be iterated from. It must exist within the index.

as_directory controlls whether to attempt to replace all links below that link. In this case the index is iterated beyond the first link for all links which begin with the first link.

infostructure(index object, file handler, oldurl, as_directory)

This function will use a previously build index to update all of the files referenced from that index that need updating.

The index object will be treated as a BiIndex.

The file handler should be a function which can be called on a filename and will update that file with the new URL.

oldurl is the base URL which should be iterated from. It must exist within the index.

as_directory controlls whether to attempt to replace all links below that link. In this case the index is iterated beyond the first link for all links which begin with the first link.

check_url_is_full ^

The aim of this function is to check whether a given url is full

syntax highlighting: