Class AutomateIt::PackageManager::CPAN
In: lib/automateit/package_manager/cpan.rb
Parent: ::AutomateIt::PackageManager::BaseDriver

PackageManager::CPAN

A PackageManager driver for Perl CPAN (Comprehensive Perl Archive Network) software packages.

No automatic dependency installation

Unlike other AutomateIt PackageManager drivers, the CPAN driver will not install a package‘s dependencies automatically. This protects you because many CPAN packages require a specific version of Perl, often one which you don‘t have installed, and installing that dependency will destroy your Perl interpreter and everything that depends on it. Therefore, you must specify all package dependencies manually. If a package dependency isn‘t found, the install will fail.

Specifying Perl interpreter

Use setup to specify the Perl interpreter to use for all subsequent calls.

Example:

  package_manager[:cpan].setup(:perl => "/usr/local/bin/perl")
  package_manager.install %w(File::Next App::Ack), :with => :cpan

Methods

Constants

CPAN_WRAPPER = File.join(::AutomateIt::Constants::HELPERS_DIR, "cpan_wrapper.pl")

Attributes

perl  [RW]  Path to Perl interpreter

Public Instance methods

Options:

  • :perl — Command to use as the Perl interpreter, otherwise defaults to the one specified during setup or to "perl"

See AutomateIt::PackageManager#install

Options:

  • :perl — Command to use as the Perl interpreter, otherwise defaults to the one specified during setup or to "perl"

See AutomateIt::PackageManager#installed?

See AutomateIt::PackageManager#not_installed?

Setup the PackageManager::CPAN driver.

Options:

  • :perl — The absolute, relative or unqualified path for the Perl interpreter to use. E.g., "perl" or "/usr/local/bin/perl".

Options:

  • :perl — Command to use as the Perl interpreter, otherwise defaults to the one specified during setup or to "perl"

See AutomateIt::PackageManager#uninstall

[Validate]