Test::File::ShareDir::Object::Module - Object Oriented ShareDir creation for modules
ShareDir
version 0.4.1
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;
module_names
my @names = $instance->module_names();
Returns the names of all modules listed in the modules set.
modules
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::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
$instance->add_to_inc();
Adds the Tempdir ShareDir ( inc ) to the global @INC.
Tempdir
inc
@INC
A Test::File::ShareDir::Object::Inc object.
Test::File::ShareDir::Object::Inc
A hash of :
Module::Name => "relative/path"
root
The origin all paths's are relative to.
( Defaults to cwd )
cwd
Kent Fredric <kentnl@cpan.org>
This software is copyright (c) 2013 by Kent Fredric <kentnl@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Test::File::ShareDir, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::File::ShareDir
CPAN shell
perl -MCPAN -e shell install Test::File::ShareDir
For more information on module installation, please visit the detailed CPAN module installation guide.