Test::File::ShareDir::Object::Module(3pm)

Test::File::ShareDir::Object::Module3pm

Object oriented sharedir creation for modules

Usage

    use Test::File::ShareDir::Object::Module;
    my $dir = Test::File::ShareDir::Object::Module->new(
        root    => "some/path",
        modules => {
            "Hello::Nurse" => "share/HN"
        },
    );
    $dir->install_all_modules;
    $dir->add_to_inc;

Version

version 1.001002

Methods

"module_names"

    my @names = $instance->module_names();

Returns the names of all modules listed in the "modules" set.

"module_share_target_dir"

    my $dir = $instance->module_share_target_dir("Module::Name");

Returns the path where the "ShareDir" will be created for "Module::Name"

"module_share_source_dir"

    my $dir = $instance->module_share_source_dir("Module::Name");

Returns the path where the "ShareDir" will be COPIED FROM for "Module::Name"

"install_module"

    $instance->install_module("Module::Name");

Installs "Module::Name"'s "ShareDir"

"install_all_modules"

    $instance->install_all_modules();

Installs all "module_names".

"add_to_inc"

DEPRECATED: Use "register" instead.

"register"

    $instance->register();

Adds the "Tempdir" "ShareDir" ( "inc" ) to the global @INC

Since 1.001000

"clear"

    $instance->clear();

Removes the "Tempdir" "ShareDir" ( "inc" ) from the global @INC

Since 1.001000

Attributes

"inc"

A "Test::File::ShareDir::Object::Inc" object.

"modules"

A hash of :

    Module::Name => "relative/path"

"root"

The origin all paths's are relative to.

( Defaults to "cwd" )

Releases

6 releases since Debian 8 (Jessie); the text changed 3 times.

  1. 8
  2. 9
  3. 10–11
  4. 12–13

Author

Kent Fredric <[email protected]>

From libtest-file-sharedir-perl 1.001002-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.