GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Test::DZil(3) User Contributed Perl Documentation Test::DZil(3)

Test::DZil - tools for testing Dist::Zilla plugins

version 6.024

Test::DZil provides routines for writing tests for Dist::Zilla plugins.

This module should work on any version of perl still receiving updates from the Perl 5 Porters. This means it should work on any version of perl released in the last two to three years. (That is, if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.)

Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.

  my $tzil = Builder->from_config(...);

These return class names that subclass Dist::Zilla::Dist::Builder or Dist::Zilla::Dist::Minter, respectively, with the Dist::Zilla::Tester behavior added.

  is_filelist( \@files_we_have, \@files_we_want, $desc );

This test assertion compares two arrayrefs of filenames, taking care of slash normalization and sorting. @files_we_have may also contain objects that do Dist::Zilla::Role::File.

  is_yaml( $yaml_string, $want_struct, $comment );

This test assertion deserializes the given YAML string and does a "cmp_deeply".

  is_json( $json_string, $want_struct, $comment );

This test assertion deserializes the given JSON string and does a "cmp_deeply".

  my $ini_text = dist_ini(\%root_config, @plugins);

This routine returns a string that could be used to populate a simple dist.ini file. The %root_config gives data for the "root" section of the configuration. To provide a line multiple times, provide an arrayref. For example, the root section could read:

  {
    name   => 'Dist-Sample',
    author => [
      'J. Smith <jsmith@example.com>',
      'Q. Smith <qsmith@example.com>',
    ],
  }

The root section is optional.

Plugins can be given in a few ways:

"PluginMoniker"
"[ "PluginMoniker" ]"
These become "[PluginMoniker]"
"[ "PluginMoniker", "PluginName" ]"
This becomes "[PluginMoniker / PluginName]"
"[ "PluginMoniker", { ... } ]"
"[ "PluginMoniker", "PluginName", { ... } ]"
These use the given hashref as the parameters inside the section, with the same semantics as the root section.

This behaves exactly like "dist_ini", but it merges any given root config into a starter config, which means that you can often skip any explicit root config. The starter config may change slightly over time, but is something like this:

  {
    name     => 'DZT-Sample',
    abstract => 'Sample DZ Dist',
    version  => '0.001',
    author   => 'E. Xavier Ample <example@example.org>',
    license  => 'Perl_5',
    copyright_holder => 'E. Xavier Ample',
  }

Ricardo SIGNES 😏 <rjbs@semiotic.systems>

This software is copyright (c) 2021 by Ricardo SIGNES.

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

2021-08-01 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.