Test::File::ShareDir::TempDirObject(3) User Contributed Perl Documentation Test::File::ShareDir::TempDirObject(3)

# [NAME](#NAME)

Test::File::ShareDir::TempDirObject - Internal Object to make code simpler.

# [VERSION](#VERSION)

version 1.001002

# [SYNOPSIS](#SYNOPSIS)

```
    my $object = $class->new({
        -root => 'foo', # optional
        -share => {
            -module => {
                'baz' => 'dir',
            },
            -dist => {
                'Task-baz' => 'otherdir',
            },
        },
    });
    # installs a sharedir for 'baz' by copying 'foo/dir'
    $object->_install_module('baz');
    # installs a shardir for distribution 'Task-baz' by copying 'foo/otherdir'
    $object->_install_dist('Task-baz');
    # add to @INC
    unshift @INC, $object->_tempdir->stringify;
```

# [METHODS](#METHODS)

## [new](#new)

Creates a new instance of this object.

# [AUTHOR](#AUTHOR)

Kent Fredric &lt;kentnl@cpan.org&gt;

# [COPYRIGHT AND LICENSE](#COPYRIGHT_AND_LICENSE)

This software is copyright (c) 2017 by Kent Fredric &lt;kentnl@cpan.org&gt;.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2026-10-24 perl v5.44.0

---

Document: Test::File::ShareDir::TempDirObject(3pm) from perl-test-file-sharedir 1.001002-r2 (Chainguard OS)
Source: https://github.com/kentnl/Test-File-ShareDir
