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::Dist - Object Oriented ShareDir creation for distributions

Attributes

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

   "dists"
       A hash of :

           Dist-Name => "relative/path"

   "root"
       The origin all paths's are relative to.

       ( Defaults to "cwd" )

Author

       Kent Fredric <kentnl@cpan.org>

Methods

"dist_names"
           my @names = $instance->dist_names();

       Returns the names of all distributions listed in the "dists" set.

   "dist_share_target_dir"
           my $dir = $instance->dist_share_target_dir("Dist-Name");

       Returns the path where the "ShareDir" will be created for "Dist-Name"

   "dist_share_source_dir"
           my $dir = $instance->dist_share_source_dir("Dist-Name");

       Returns the path where the "ShareDir" will be COPIEDFROM for "Dist-Name"

   "install_dist"
           $instance->install_dist("Dist-Name");

       Installs "Dist-Name"'s "ShareDir"

   "install_all_dists"
           $instance->install_all_dists();

       Installs all "dist_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::Dist - Object Oriented ShareDir creation for distributions

Synopsis

           use Test::File::ShareDir::Object::Dist;

           my $dir = Test::File::ShareDir::Object::Dist->new(
               root    => "some/path",
               dists => {
                   "Hello-Nurse" => "share/HN"
               },
           );

           $dir->install_all_dists;
           $dir->add_to_inc;

Version

       version 1.001002

See Also