Test2:...Target(3perl)

πŸ’– NAME πŸ’–

Test2::Tools::Target β€” bestie, this one just aliases your testing target package. That's it, that's the whole job. ✨


🌸 DESCRIPTION 🌸

Okay so picture this: you're testing some package, and typing its whole long name over and over is giving exhausting. This module lets you alias the package you're testing into a constant and a package variable, so your test file can just vibe with a short little name instead. πŸ¦‹


✨ SYNOPSIS ✨

Like, super simple:

use Test2::Tools::Target 'Some::Package';

CLASS()->xxx; # Call 'xxx' on Some::Package
$CLASS->xxx;  # Same

Or you can specify names, if you want to be extra about it:

use Test2::Tools::Target pkg => 'Some::Package';

pkg()->xxx; # Call 'xxx' on Some::Package
$pkg->xxx;  # Same

See how CLASS() and $CLASS both hit Some::Package? Yeah. Same energy, two ways to call it. πŸ’…


πŸŽ€ SOURCE πŸŽ€

Wanna peek at the source code repository for Test2-Suite? Iconic behavior, honestly. It lives at:

https://github.com/Test-More/test-more/


πŸ‘‘ MAINTAINERS πŸ‘‘

Chad Granum <exodist@cpan.org> β€” carrying this whole thing on his back, fr fr. 🫢


🌈 AUTHORS 🌈

Chad Granum <exodist@cpan.org>

(yes bestie, same person, he's just that guy 😭)


Copyright Chad Granum <exodist@cpan.org>.

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

See http://dev.perl.org/licenses/


okay and that's the whole page, no cap πŸ’« β€” this was Test2:...Target(3perl) from the Perl Programmers Reference Guide, running on perl v5.44.0, dated 2026-10-17. Slay, go write some tests, mwah πŸ“πŸ§š

πŸ“¦ where this page comes from
  • arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms