The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Name

Module::Provision::TraitFor::CreatingDistributions - Create distributions

Synopsis

   use Moose;

   extends 'Module::Provision::Base';
   with    'Module::Provision::TraitFor::CreatingDistributions';

Version

This documents version v0.12.$Rev: 1 $ of Module::Provision::TraitFor::CreatingDistributions

Description

Create distributions using either Git or SVN for the VCS

Configuration and Environment

Requires these attributes to be defined in the consuming class; appbase, appldir, builder, exec_perms, homedir, incdir, project_file, render_templates, stash, testdir, and vcs

Defines the following attributes;

<editor>

Which text editor to use. It is a read only, lazily evaluated, simple string that cannot be null. It defaults to the editor configuration variable

Subroutines/Methods

create_directories

   $self->create_directories;

Creates the required directories for the new distribution. If subclassed this method can be modified to include additional directories

dist

   $exit_code = $self->dist;

Create a new distribution specified by the module name on the command line

dist_post_hook

   $self->dist_post_hook;

Runs after the new distribution has been created. If subclassed this method can be modified to perform additional actions after the templates have been rendered

dist_pre_hook

   $self->dist_pre_hook;

Runs before the new distribution is created. If subclassed this method can be modified to perform additional actions before the project directories are created

edit_project

   $exit_code = $self->edit_project;

Edit the project file (one of; dist.ini, Build.PL, or Makefile.PL) in the current directory

generate_metadata

   $markdown_file = $self->generate_metadata( $create_flag );

Generates the distribution metadata files. If the create_flag is TRUE returns the name of the README.md file

metadata

   $exit_code = $self->metadata;

Calls "generate_metadata" with the create flag set to FALSE

prove

   $exit_code = $self->prove;

Tests the distribution

show_tab_title

   $exit_code = $self->show_tab_title;

Print the tab title for the current project to STDOUT

Diagnostics

None

Dependencies

Class::Usul
Moose::Role
MooseX::Types::Common::String

Incompatibilities

There are no known incompatibilities in this module

Bugs and Limitations

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Acknowledgements

Larry Wall - For the Perl programming language

Author

Peter Flanigan, <pjfl@cpan.org>

License and Copyright

Copyright (c) 2013 Peter Flanigan. All rights reserved

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

This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE