NAME

CPAN::Mini::ProjectDocs - mini CPAN documentation browser

SYNOPSIS

see the mcd command for a full example.

DESCRIPTION

This module and associated script mcd let you search and display documentation for the modules in you CPAN mini. The documentation is displayed in your browser (text mode browsers supported)

DOCUMENTATION

You most probably want to run the mcd script, use the --help option for help.

SUBROUTINES/METHODS

get_mcd_paths($cpan_mini, $mcd_cache)

Given a CPAN mini location and a cache location, computes a list containing the paths used by CPAN::Mini::ProjectDocs.

Arguments

$cpan_mini - Location of the CPAN::MINI repository
$mcd_cache - Location of the cache maintained by CPAN::Mini::ProjectDocs

Returns - A list containing the paths used by CPAN::Mini::ProjectDocs

Exceptions - None

generate_html($cpan_mini, $mcd_cache, $distribution, $html_index)

Generates the HTML documentation for $distribution. The generation is performed only if the documentation does not exist in the cache.

Arguments

$cpan_mini - Location of the CPAN::MINI repository
$mcd_cache - Location of the cache maintained by CPAN::Mini::ProjectDocs
$distribution - Location of the distribution containing the module to display
$html_index - Boolean - generate a pure HTML index for text based browser

Returns - $html_documentation_location

Exceptions - problems with the distribution extraction, write errors on the file system, ...

generate_pure_html_index($path, $file)

Generate a pure HTML index for text based browsers.

Arguments

$path - path to the POD::ProjDocs generated index file
$file - POD::ProjDocs generated index file

Returns - The location of the pure HTML index

Exceptions - None

get_module_distribution($cpan_mini, $mcd_cache, $module)

Finds the distribution containing the module.

my $distribution = get_module_distribution($cpan_mini, $mcd_cache, $module) ;

Arguments

$cpan_mini - Location of the CPAN::MINI repository
$mcd_cache - Location of the cache maintained by CPAN::Mini::ProjectDocs
$module - Name of the module to display

Returns - The location of the distribution containing the module to display

Exceptions - read error if the cache is not already generated

generate_cache($cpan_mini, $mcd_cache)

Checks the state of the CPAN::Mini::ProjectDocs cache and regenerates it if necessary.

Arguments

$cpan_mini - Location of the CPAN::MINI repository
$mcd_cache - Location of the cache maintained by CPAN::Mini::ProjectDocs

Returns - Nothing

Exceptions - None

regenerate_cache($cpan_mini, $mcd_cache)

Generates the CPAN::Mini::ProjectDocs cache.

Arguments

$cpan_mini - Location of the CPAN::MINI repository
$mcd_cache - Location of the cache maintained by CPAN::Mini::ProjectDocs

Returns - Nothing

Exceptions - File sytem related errors if any

search_modules($cpan_mini, $mcd_cache, $module)

Matches $module to all the modules in the CPAN mini repository and displays the match results.

Arguments

$cpan_mini - Location of the CPAN::MINI repository
$mcd_cache - Location of the cache maintained by CPAN::Mini::ProjectDocs
$module - Name of the module to match

Returns - Nothing

Exceptions

get_file_MD5($file)

Returns the MD5 of the $file argument.

Arguments

$file - The location of the file to compute an MD5 for

Returns - A string containing the file md5

Exceptions - fails if the file can't be open

BUGS AND LIMITATIONS

None so far.

AUTHOR

Nadim ibn hamouda el Khemir
CPAN ID: NH
mailto: nadim@cpan.org

LICENSE AND COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc CPAN::Mini::ProjectDocs

You can also look for information at:

SEE ALSO

CPAN::Mini::Webserver, elinks