Dist::Inkt::Role::Test(3pm)

Dist::Inkt::Role::Test3pm

Run various tests on a distribution at build time

Usage

   package Dist::Inkt::Profile::JOEBLOGGS;
   
   use Moose;
   extends qw(Dist::Inkt);
   with (
      ...,
      "Dist::Inkt::Role::Test",
      ...,
   );
   
   after BUILD => sub {
      my $self = shift;
      
      # Run a test before attempting to build
      # the dist dir.
      #
      $self->setup_prebuild_test(sub {
         die "rude!" if $self->name =~ /Arse/;
      });
      
      # Run a test after building the dist dir.
      #
      $self->setup_build_test(sub {
         die "missing change log" unless -f "Changes";
      });
      
      # Run a test after tarballing the dist dir.
      #
      $self->setup_tarball_test(sub {
         my $tarball = $_[1]
         die "too big" if $tarball->stat->size > 1_000_000;
      });
   };
   
   1;

Overview

This role exists to provide hooks for Dist::Inkt subclasses and other roles to run tests.

Bundled with this role are a few other roles that consume it in useful ways.

Disclaimer of warranties

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Releases

6 releases since Debian 8 (Jessie); the text changed 3 times.

  1. 8–10
  2. 11
  3. 12
  4. 13

Bugs

Please report any bugs to <http://rt.cpan.org/Dist/Display.html?Queue=Dist-Inkt-Role-Test>.

Author

Toby Inkster <[email protected]>.

From libdist-inkt-role-test-perl 0.002-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.