App-Build
view release on metacpan or search on metacpan
lib/App/Build.pm view on Meta::CPAN
dist_name => "App-Build-Foo",
dist_version => "1.0",
dist_author => "stephen.adkins\@officevision.com",
extra_dirs => [ "htdocs", "cgi-bin", "etc", "var" ],
license => "perl",
build_requires => {
"App::Build" => 0, # needed for installing the software
},
);
$build->create_build_script;
=head1 DESCRIPTION
App::Build is a subclass of Module::Build, so you can use
it in place of Module::Build when creating your "Build.PL"
installation scripts.
Module::Build is good at
installing perl modules and programs/scripts. Full applications
(i.e. web applications) need to install other files such as
web pages, images, CSS style sheets, javascript files,
CGI programs, data files, and configuration data.
App::Build addresses these issues.
The vision of App::Build is to make installing entirely
functional perl applications (particularly web applications)
as easy as installing individual modules from CPAN.
An ISP customer (or other unprivileged user)
who has shell access should be able to install any number
of available applications from CPAN simply by typing the
usual
perl -MCPAN -e "install App::Build::Foo"
and the "Foo" application is installed on his account.
App::Build does this by implementing the following features.
1. Distributions that use App::Build instead of Module::Build
can easily install files to other places, besides just
"lib" and "bin". e.g. "htdocs", "cgi-bin", "etc".
(see the "extra_dirs" argument in the example in the Synopsis
above)
2. App::Build also adds a hook into the "install" action to
call the "configure()" method. If you are subclassing
App::Build, you can override this method and perform
customized configuration tasks.
=head1 INCLUDED APPLICATIONS AND EXTERNAL APPLICATIONS
Although the distribution primarily supports the deployment
of an application whose files are included in the distribution,
it also supports deployment of applications which are not
included or are not on CPAN at all.
Anyone who finds a useful perl application somewhere
(i.e. "Foo") can write a small perl distribution called
App-Build-Foo and upload it to CPAN.
When someone uses the CPAN shell, they can install the
application simply by typing
install App::Build::Foo
Within the App-Build-Foo distribution would be a module,
App::Build::Foo, which would be a subclass of App::Build.
It would contain any specific logic necessary to download
and install the Foo application.
All applications installed with App::Build (and its
derivatives) should conform to a set of standards (see
below) so that when multiple applications are installed,
they are integrated seamlessly and work side by side.
=head1 APPLICATION INSTALLATION REQUIREMENTS
The following are the requirements of all App::Build
installations.
* The installation MUST be useful to ISP's (internet
service providers) and ASP's (application service
providers) such that the software is installed
in such a way that each customer of theirs may use
it without any interactions with other customers.
* The installation SHOULD allow for multiple versions
even for an unprivileged user (an ISP/ASP customer).
This allows a user to install a new version of an
application and evaluate it and run it in parallel
with an existing version of the application.
=head1 APPLICATION INSTALLATION STANDARDS
The following are additional standards of all App::Build
installations.
* TBD
=head1 App::Build CONFIGURABILITY
Since App::Build uses App::Options, App::Options makes all the
of the --var=value options available via the global %App::options hash.
App::Build however does not remove the --var=value options from @ARGV.
This will be put to good use sometime in the future.
=head1 FIX-UPS
Module::Build complains if the PREFIX environment variable is
set. App::Build doesn't. It just ignores it.
The CPAN shell (for some reason I don't understand) runs Build.PL
as "perl Build.PL Build" and this fails.
App::Build just throws away the "Build" so that the default "build"
action is invoked.
Module::Build deprecated the PREFIX option to Makefile.PL
(i.e. "perl Makefile.PL PREFIX=/usr/foo"). App::Build just makes
the PREFIX option a synonym for "install_base", which does
( run in 1.667 second using v1.01-cache-2.11-cpan-b16cb0d3907 )