NAME

Ado::Build - Custom routines for Ado installation

SYNOPSIS

#See Build.PL
use 5.014000;
use strict;
use warnings FATAL => 'all';
use FindBin;
use lib("$FindBin::Bin/lib");
use Ado::Build;
my $builder = Ado::Build->new(..);
$self->create_build_script();

#on the command line
cd /path/to/cloned/Ado
perl Build.PL
./Build
./Build test
#change/add some code
./Build test
./Build perltidy
./Build dist
./Build submit
#.... and so on

DESCRIPTION

This is a subclass of Module::Build. We use Module::Build::API to add custom functionality so we can install Ado in a location chosen by the user.

This module and Ado::BuildPlugin exist just because of the additional install paths that we use beside lib and bin. These modules also can serve as examples for your own builders if you have some custom things to do during build, test, install and even if you need to add a new ACTION_* to your setup.

ATTRIBUTES

Ado::Build defines some attributes, used across different actions.

PERL_FILES

Returns the list of absolute paths to directories in the project containing Perl files. Read-only.

$self->PERL_FILES;
#(/base/dir/bin, /base/dir/lib, /base/dir/t, /base/dir/etc) 

METHODS

Ado::Build inherits all methods from Module::Build and implements the following ones.

create_build_script

This method is called in Build.PL. In this method we also call add_build_element for etc public, templates and log folders. Finally we set all the install_paths for the distro and we call $self->SUPER::create_build_script.

process_etc_files

Moves files found in Ado/etc to Ado/blib/etc. See "METHODS" in Module::Build::API Returns void.

process_log_files

Moves files found in Ado/log to Ado/blib/log. Returns void.

process_public_files

Moves files found in Ado/public to Ado/blib/public. Returns void.

process_templates_files

Moves files found in Ado/templates to Ado/blib/templates. Returns void.

ACTION_build

We put here custom functionality executed around the $self->SUPER::ACTION_build. See the source for details.

ACTION_dist

We put here custom functionality executed around the $self->SUPER::ACTION_dist. See the sources for details.

ACTION_install

Changes file permissions to 0600 of some files like etc/ado.sqlite and to 0400 of some files like etc/ado.conf. You can put additional custom functionality here.

ACTION_fakeuninstall

Dry run for uninstall operation against module Ado.

ACTION_uninstall

Perform uninstall operation against Ado module.

ACTION_perltidy

Tidies all *.conf, *.pm, *.pl, *.t files found in project directories bin, lib, t, etc in the distribution. Uses the ./pertidyrc found in the project root directory. Cleans up all .bak files. This action does not tidies Build.PL. Use perltidy Build.PL for that.

perl Build.PL
./Build perltidy
./Build
...

ACTION_submit

TODO: commit and push after testing tidying and who knows what..

./Build submit

do_create_readme

Creates the README file from lib/Ado/Manual.pod.

SEE ALSO

Ado::BuildPlugin, Module::Build::API, Module::Build::Authoring, "ADVANCED_RECIPES" in Module::Build::Cookbook, Build.PL in Ado distribution directory.

AUTHOR

Красимир Беров (Krasimir Berov)

COPYRIGHT AND LICENSE

Copyright 2013 Красимир Беров (Krasimir Berov).

This program is free software, you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License v3 (LGPL-3.0). You may copy, distribute and modify the software provided that modifications are open source. However, software that includes the license may release under a different license.

See http://opensource.org/licenses/lgpl-3.0.html for more information.