The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Name

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

Synopsis

   use Moose;

   extends 'Module::Provision::Base';
   with    '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 - Create a new distribution

   $exit_code = $self->dist;

The distributions main module name is specified 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 - Edit the project file

   $exit_code = $self->edit_project;

The project file is 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 - Generate the distribution metadata files

   $exit_code = $self->metadata;

Calls "generate_metadata" with the create flag set to FALSE

prove - Runs the tests for the distribution

   $exit_code = $self->prove;

Returns the exit code

select_project - List available projects and select one to edit

   $exit_code = $self->select_project

Use from the shell like this:

   cd $(module_provision -q select_project 2>&1 1>/dev/tty)

show_tab_title - Display the tab title for the current distribution

   $exit_code = $self->show_tab_title;

Print the tab title for the current project to STDOUT

Diagnostics

None

Dependencies

Class::Usul
Moose::Role

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