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>
π COPYRIGHT AND LICENSE π
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
- opensuse-leap 16.0: perl-Test-InDistDir 1.112071-bp160.1.12 Β· SUSE-Permissive
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms