Test::InDistDir(3)

πŸ’… Test::InDistDir β€” bestie edition ✨

okay so real talk, this is the Test::InDistDir(3) page from the User Contributed Perl Documentation, and honestly? it's a whole vibe. it's a little module that fixes your test environment setup for development with an IDE. tiny but iconic. let's get into it 🫢


✨ NAME ✨

Test::InDistDir β€” test environment setup for development with IDE πŸŽ€

🌸 VERSION 🌸

version 1.112071 β€” yes bestie, that's the number, don't @ me.

⭐ SYNOPSIS ⭐

use Test::More;
use Test::InDistDir;

# when this is run from inside t/ with a default @INC, it will now be in the
# dist dir and include ./lib in @INC

like, that comment is literally the whole plot. you run it from inside t/ with a default @INC, and boom πŸ’₯ β€” you're in the dist dir and ./lib is in @INC. slay.

πŸ¦‹ DESCRIPTION πŸ¦‹

So this module helps run test scripts in IDEs like Komodo. (yes, IDEs. we're being fancy.)

When running test scripts in an IDE i have to set up a project file defining the dist dir to run tests in and a lib dir to load additional modules from. Often I didn't feel like doing that, especially when i only wanted to do a small patch to a dist. In those cases i added a BEGIN block to mangle the environment for me.

Lowkey this module basically is that BEGIN block. πŸ’… It automatically moves up one directory when it cannot see the test script in "t/$scriptname" and includes 'lib' in @INC when there's no blib present. That way the test ends up with almost the same environment it'd get from EUMM/prove/etc., even when it's actually run inside the t/ directory.

And at the same time it will still function correctly when called by EUMM/prove/etc., since it does not change the environment in those cases. no cap, it just knows. 🧚

πŸ“ SUPPORT πŸ“

πŸ’œ Bugs / Feature Requests

Please report any bugs or feature requests by email to "bug-test-indistdir at rt.cpan.org", or through the web interface at <http://rt.cpan.org/Public/Dist/Display.html?Name=Test-InDistDir>. You will be automatically notified of any progress on the request by the system. yes, the system. it's got you. 🫢

🌈 Source Code

This is open source software. The code repository is available for public review and contribution under the terms of the license.

<https://github.com/wchristian/Test-InDistDir>

git clone https://github.com/wchristian/Test-InDistDir

go clone it bestie, it's giving collaborative. ✨

πŸ‘‘ AUTHOR πŸ‘‘

Christian Walde <walde.christian@googlemail.com>

This software is Copyright (c) 2011 by Christian Walde.

This is free software, licensed under:

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, Version 2, December 2004

I mean. iconic license behavior honestly. do what you want. periodt. πŸ”₯


and that's the whole page, bestie β€” perl v5.42.0, dated 2011-12-21, Test::InDistDir(3), signing off with a little kiss πŸ’– mwah!

πŸ“¦ where this page comes from