Checkdistro

Table of Contents

NAME
Synopsis
Description
Constructor and initialization
Method: distro_count('Some::Module')
Method: distro_exists('Some::Module')
Method: dump()
Method: find_modules()
Method: get_config()
Method: module_names()
Method: modules()
Method: specs('Some::Module')
Method: versions('Some::Module')
Required Modules
Resources
Author
Copyright

Checkdistro

NAME

Local::CheckDistro - Provide info about distros in preparation for installation

Synopsis

See docs for Local::Build.

Description

Local::CheckDistro is a pure Perl module.

Note: Version numbers are extracted from the file name of the distro.

Constructor and initialization

new(...) returns a Local::CheckDistro object.

This is the class's contructor.

Usage: Local::CheckDistro -> new().

Calling new() calls find_modules() which builds a hash of locally-available distros.

Method: distro_count('Some::Module')

Returns an integer.

The number of distros of the module in module_dir (from the config file).

Used to warn about multiple distros of a module.

Method: distro_exists('Some::Module')

Returns 0 or 1.

Used to ensure methods in Local::Build don't waste my time.

Method: dump()

Returns nothing.

Dump info about the modules found.

Method: find_modules()

Returns nothing.

Finds all the distros in module_dir, and hence builds a hash of locally-available distros.

Handles a few special cases.

Moves killer-app-1.00.tar.gz to killer-app-1.00.tgz.

Method: get_config()

Returns the config hash ref, which new() got a copy of from Local::Config.

Method: module_names()

Returns a sorted array ref of module names in 'Some::Module' format.

This array ref will not contain duplicates.

Method: modules()

Returns a sorted array ref of module names and versions in a nice "$name V $version" format.

Note: Version numbers are extracted from the file name of the distro.

This array ref will not contain duplicates, but a module may have more than version.

Method: specs('Some::Module')

Returns an hash ref of what's known about the first version found (i.e.: uses [0]) of the given module.

Hence assumes module_dir contains the one version you are really interested in.

To deal with this, I move other versions of distros into ./misc/.

Method: versions('Some::Module')

Returns a string of the versions found, in '1.01/1.02' format.

Required Modules

  • Carp
  • File::Copy
  • Local::Config

Resources

http://savage.net.au/Perl-modules/html/local-module-overview.html

Author

Local::CheckDistro was written by Ron Savage in 2006.

Home page: http://savage.net.au/index.html

Copyright

Australian copyright © 2006, Ron Savage. All rights reserved.

	All Programs of mine are 'OSI Certified Open Source Software';
	you can redistribute them and/or modify them under the terms of
	The Artistic License, a copy of which is available at:
	http://www.opensource.org/licenses/index.html
 
Top of page