DOKK / manpages / debian 12 / libtest-lib-perl / Test::Lib.3pm.en
Test::Lib(3pm) User Contributed Perl Documentation Test::Lib(3pm)

Test::Lib - Use libraries from a t/lib directory

    use Test::Lib;
    use Test::More;
    use Private::Testing::Module;
    ok 1, 'passing test';
    my_test 'test from private module';

Searches upward from the calling module for a directory t with a lib directory inside it, and adds it to the module search path. Looks upward up to 5 directories. This is intended to be used in test modules either directly in t or in a subdirectory to find their included testing libraries located in t/lib.

Graham Knop <haarg@haarg.org>

This software is Copyright (c) 2012 by Graham Knop.

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

2022-10-13 perl v5.34.0