Test::F...t::Dist(3)

This is the Test::File::ShareDir::Object::Dist(3) page from the User Contributed Perl Documentation β€” manual name folded in right here at the top, bestie πŸ’–

✨ NAME ✨

Test::File::ShareDir::Object::Dist β€” Object Oriented ShareDir creation for distributions. It's giving "make a share dir, but make it OO" πŸ’…

🌸 VERSION 🌸

version 1.001002 β€” that's the version, no cap.

πŸ¦‹ SYNOPSIS πŸ¦‹

okay so the whole vibe starts like this:

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;

πŸŽ€ METHODS πŸŽ€

these are the methods, bestie. signatures stay exactly as they are, because we respect the source ✨

πŸ’– dist_names πŸ’–

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

Returns the names of all distributions listed in the dists set. literally all the names, gathered up 🫢

πŸ’– 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. that's the destination, the target, the "where it's gonna live" 🎯

πŸ’– dist_share_source_dir πŸ’–

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

Returns the path where the ShareDir will be COPIED FROM for Dist-Name. yes, COPIED FROM in all caps, she's important πŸ’…

πŸ’– install_dist πŸ’–

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

Installs Dist-Name's ShareDir. one dist, one install, periodt ✨

πŸ’– install_all_dists πŸ’–

$instance->install_all_dists();

Installs all dist_names. every single one of them, no dist left behind πŸ”₯

πŸ’– add_to_inc πŸ’–

DEPRECATED: Use register instead.

she's retired, bestie. use register now 🫢

πŸ’– 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. that's the object, that's the vibe πŸŽ€

πŸ’œ dists πŸ’œ

A hash of:

Dist-Name => "relative/path"

πŸ’œ root πŸ’œ

The origin all paths's are relative to.

( Defaults to cwd )

not me keeping the original paths's grammar, we love a typo moment πŸ™ˆ

πŸ‘‘ AUTHOR πŸ‘‘

Kent Fredric <kentnl@cpan.org> β€” the author, the icon, the legend πŸ’–

This software is copyright (c) 2017 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.


kisses and @INC blessings πŸ’… β€” source/version perl v5.42.0, dated 2017-03-03. bye bestie 🫢

πŸ“¦ where this page comes from