Dist-Zilla-Plugin-Test-Kwalitee-Extra

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/Test/Kwalitee/Extra.pm  view on Meta::CPAN

package Dist::Zilla::Plugin::Test::Kwalitee::Extra;

use strict;
use warnings;

# ABSTRACT: Dist::Zilla plugin for Test::Kwalitee::Extra
our $VERSION = 'v0.2.1'; # VERSION

use Moose;
use Data::Section-setup;
with 'Dist::Zilla::Role::FileGatherer', 'Dist::Zilla::Role::TextTemplate';

sub mvp_multivalue_args { return qw( arg ) }

has arg => ( is => 'ro', isa => 'ArrayRef[Str]', traits => [ 'Array' ], default => sub { [] }, handles => { push_arg => 'push' }, );

sub gather_files {
  my ( $self, ) = @_;

  my $tests = q{eval "use Test::Kwalitee::Extra";};

  if ( @{ $self->arg } > 0 ) {

    my $arg = join ' ', @{ $self->arg };
    $tests = qq[eval "use Test::Kwalitee::Extra qw( $arg )"];

  }
  require Dist::Zilla::File::InMemory;

  for my $filename ( qw( xt/release/kwalitee.t ) ) {
    my $content = $self->fill_in_string( ${ $self->section_data( $filename ) }, { tests => \$tests }, );
    $self->add_file( Dist::Zilla::File::InMemory->new( { 'name' => $filename, 'content' => $content, } ), );
  }
} ## end sub gather_files

__PACKAGE__->meta->make_immutable;
no Moose;
1;

=pod

=head1 NAME

Dist::Zilla::Plugin::Test::Kwalitee::Extra - Dist::Zilla plugin for Test::Kwalitee::Extra

=head1 VERSION

version v0.2.1

=head1 SYNOPSIS

In your C<dist.ini>,

  [Test::Kwalitee::Extra]
  arg = !has_example

If you want to avoid network access

  [Test::Kwalitee::Extra]
  arg = !prereq_matches_use

=head1 DESCRIPTION

This module is a L<Dist::Zilla> plugin for L<Test::Kwalitee::Extra>. It creates C<xt/release/kwalitee.t> to call L<Test::Kwalitee::Extra>.

Most part of codes and tests are identical to L<Dist::Zilla::Plugin::Test::Kwalitee>. Only the followings are changed points.

=over 4

=item *

Use L<Test::Kwalitee::Extra> instead of L<Test::Kwalitee>.

=item *



( run in 1.812 second using v1.01-cache-2.11-cpan-39bf76dae61 )