logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Test::File::ShareDir::Object::Module - Object Oriented ShareDir creation for modules

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" )

Author

       Kent Fredric <kentnl@cpan.org>

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 COPIEDFROM 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

       Since1.001000"clear"
           $instance->clear();

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

       Since1.001000

Name

       Test::File::ShareDir::Object::Module - Object Oriented ShareDir creation for modules

Synopsis

           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

See Also