Thread: [Module::Build] extra_dirs feature: should I contribute a patch to Module::Build?
Status: Beta
Brought to you by:
kwilliams
|
From: Stephen A. <spa...@gm...> - 2006-02-16 19:57:04
|
Hi, I have written a module called App::Build which is derived from Module::Bui= ld. I put some features into it that I believe could and should be moved up to Module::Build. The description of App::Build is below. My specific question at the moment is: * Should I contribute a patch to add the "extra_dirs" feature to Module::Bu= ild? * (i.e. Is this a feature you want in Module::Build?) Thanks, Stephen http://search.cpan.org/~spadkins/App-Build/lib/App/Build.pm [excerpted below] =3Dhead1 NAME App::Build - extends Module::Build to build/install/configure entire applications (i.e. web applications), not just modules and programs =3Dhead1 SYNOPSIS This module is used within a Build.PL script directly or it can be subclassed to provide extra capabilities. use App::Build; my $build =3D App::Build->new ( dist_name =3D> "App-Build-Foo", dist_version =3D> "1.0", dist_author =3D> "spa...@gm...", extra_dirs =3D> [ "htdocs", "cgi-bin", "etc", "var" ], license =3D> "perl", build_requires =3D> { "App::Build" =3D> 0, # needed for installing the software }, ); $build->create_build_script; =3Dhead1 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. [... intermediate doc deleted ...] _get_extra_dirs() Gets the list of extra_dirs to be installed. The extra_dirs may be specified in the Build.PL in a variety of ways. It can be a scalar (comma-separated list of directories), an array ref of directories, or a hash ref where the keys are the directories. If extra_dirs is specified with a hash ref, the hash values are hashrefs of attributes. i.e. extra_dirs =3D> { var =3D> { dest_dir =3D> "var", }, htdocs =3D> { dest_dir =3D> "htdocs", }, "cgi-bin" =3D> { # any dir ending in "bin" contains executable scri= pts dest_dir =3D> "cgi-bin", }, support =3D> { dest_dir =3D> "support", executable =3D> 1, # treat contents as executable scripts }, }, [... for complete/further doc, follow the URL given above ...] |
|
From: Stephen A. <spa...@gm...> - 2006-02-16 21:33:20
|
Hi, I have written a module called App::Build which is derived from Module::Bui= ld. I put some features into it that I believe could and should be moved up to Module::Build. The description of App::Build is below. My specific question at the moment is: * Should I contribute a patch to add the "extra_dirs" feature to Module::Bu= ild? * (i.e. Is this a feature you want in Module::Build?) Thanks, Stephen http://search.cpan.org/~spadkins/App-Build/lib/App/Build.pm [excerpted below] =3Dhead1 NAME App::Build - extends Module::Build to build/install/configure entire applications (i.e. web applications), not just modules and programs =3Dhead1 SYNOPSIS This module is used within a Build.PL script directly or it can be subclassed to provide extra capabilities. use App::Build; my $build =3D App::Build->new ( dist_name =3D> "App-Build-Foo", dist_version =3D> "1.0", dist_author =3D> "spa...@gm...", extra_dirs =3D> [ "htdocs", "cgi-bin", "etc", "var" ], license =3D> "perl", build_requires =3D> { "App::Build" =3D> 0, # needed for installing the software }, ); $build->create_build_script; =3Dhead1 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. [... intermediate doc deleted ...] _get_extra_dirs() Gets the list of extra_dirs to be installed. The extra_dirs may be specified in the Build.PL in a variety of ways. It can be a scalar (comma-separated list of directories), an array ref of directories, or a hash ref where the keys are the directories. If extra_dirs is specified with a hash ref, the hash values are hashrefs of attributes. i.e. extra_dirs =3D> { var =3D> { dest_dir =3D> "var", }, htdocs =3D> { dest_dir =3D> "htdocs", }, "cgi-bin" =3D> { # any dir ending in "bin" contains executable scrip= ts dest_dir =3D> "cgi-bin", }, support =3D> { dest_dir =3D> "support", executable =3D> 1, # treat contents as executable scripts }, }, [... for complete/further doc, follow the URL given above ...] |