Test::File::ShareDir::Object::Inc(3) User Contributed Perl Documentation Test::File::ShareDir::Object::Inc(3)

# [NAME](#NAME)

Test::File::ShareDir::Object::Inc - Shared tempdir object code to inject into @INC

# [VERSION](#VERSION)

version 1.001002

# [SYNOPSIS](#SYNOPSIS)

```
    use Test::File::ShareDir::Object::Inc;
    my $inc = Test::File::ShareDir::Object::Inc->new();
    $inc->tempdir() # add files to here
    $inc->module_tempdir() # or here
    $inc->dist_tempdir() # or here
    $inc->add_to_inc;
```

# [DESCRIPTION](#DESCRIPTION)

This class doesn't do very much on its own.

It simply exists to facilitate "tempdir" creation, and the injection of those "tempdir"'s into @INC

# [METHODS](#METHODS)

## ["add\_to\_inc"](#_add_to_inc_)

**DEPRECATED:** Use "register" instead.

## ["register"](#_register_)

```
    $instance->register;
```

Allows this "Inc" to be used.

Presently, this injects the associated "tempdir" into @INC

*Since 1.001000*

## ["clear"](#_clear_)

```
    $instance->clear();
```

Prevents this "Inc" from being used.

Presently, this removes the "tempdir" from @INC

*Since 1.001000*

# [ATTRIBUTES](#ATTRIBUTES)

## ["tempdir"](#_tempdir_)

A path to a "tempdir" of some description.

## ["module\_tempdir"](#_module_tempdir_)

The "module" "ShareDir" base directory within the "tempdir"

## ["dist\_tempdir"](#_dist_tempdir_)

The "dist" "ShareDir" base directory within the "tempdir"

# [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-26 perl v5.44.0

---

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