Ado::Build - Custom routines for Ado installation
#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
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.
lib
bin
ACTION_*
Ado::Build defines some attributes, used across different actions.
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)
Ado::Build inherits all methods from Module::Build and implements the following ones.
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.
Build.PL
add_build_element
etc
public
templates
log
install_path
$self->SUPER::create_build_script
Moves files found in Ado/etc to Ado/blib/etc. See "METHODS" in Module::Build::API Returns void.
Ado/etc
Ado/blib/etc
Moves files found in Ado/log to Ado/blib/log. Returns void.
Ado/log
Ado/blib/log
Moves files found in Ado/public to Ado/blib/public. Returns void.
Ado/public
Ado/blib/public
Moves files found in Ado/templates to Ado/blib/templates. Returns void.
Ado/templates
Ado/blib/templates
We put here custom functionality executed around the $self->SUPER::ACTION_build. See the source for details.
$self->SUPER::ACTION_build
We put here custom functionality executed around the $self->SUPER::ACTION_test. See the source for details.
$self->SUPER::ACTION_test
We put here custom functionality executed around the $self->SUPER::ACTION_dist. See the sources for details.
$self->SUPER::ACTION_dist
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.
0600
etc/ado.sqlite
0400
etc/ado.conf
Dry run for uninstall operation against module Ado.
Perform uninstall operation against Ado module.
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.
*.conf, *.pm, *.pl, *.t
bin, lib, t, etc
./pertidyrc
.bak
perltidy Build.PL
perl Build.PL ./Build perltidy ./Build ...
TODO: commit and push after testing tidying and who knows what..
./Build submit
Creates the README file from lib/Ado/Manual.pod.
lib/Ado/Manual.pod
Ado::BuildPlugin, Module::Build::API, Module::Build::Authoring, "ADVANCED_RECIPES" in Module::Build::Cookbook, Build.PL in Ado distribution directory.
Красимир Беров (Krasimir Berov)
Copyright 2013-2014 Красимир Беров (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.
To install Ado, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Ado
CPAN shell
perl -MCPAN -e shell install Ado
For more information on module installation, please visit the detailed CPAN module installation guide.