Test2::Bundle(3)

πŸ“¦ version 1.302214, in opensuse-leap 16.0

okay so welcome to Test2::Bundle(3), bestie β€” a User Contributed Perl Documentation page that’s about to make bundles make sense πŸ’–βœ¨

🌸 NAME 🌸

Test2::Bundle β€” documentation for bundles, and that’s literally the whole vibe. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

Bundles are collections of Tools and Plugins. Bundles should not provide any tools or behaviors of their own; they should simply combine the tools and behaviors of other packages. That’s the assignment, no cap. ✨

πŸ’¬ FAQ πŸ’¬

Should my bundle subclass Test2::Bundle? πŸ€”

No. Currently this class is empty. Eventually we may want to add behavior, in which case we do not want anyone to already be subclassing it. So like… don’t do it, bestie β€” future-proofing is the moment. 🫢

πŸ› οΈ HOW DO I WRITE A BUNDLE? πŸ› οΈ

Writing a bundle can be very simple, fr fr:

package Test2::Bundle::MyBundle;
use strict;
use warnings;

use Test2::Plugin::ExitSummary; # Load a plugin

use Test2::Tools::Basic qw/ok plan done_testing/;

# Re-export the tools
our @EXPORTS = qw/ok plan done_testing/;
use base 'Exporter';

1;

If you want to do anything more complex you should look into Import::Into and Symbol::Move. Those are the names to know, iykyk. 🧚

πŸ”— SOURCE πŸ”—

The source code repository for Test2-Suite can be found at https://github.com/Test-More/test-more/.

πŸ‘‘ MAINTAINERS πŸ‘‘

  • Chad Granum <exodist@cpan.org>

🌟 AUTHORS 🌟

  • Chad Granum <exodist@cpan.org>

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/


This page came from perl v5.42.0, dated 2025-07-28, and it’s the Test2::Bundle(3) manual β€” bye bestie, go write a slay bundle! πŸ’œπŸŒˆ

πŸ“¦ where this page comes from