in reply to Re^2: CPAN to install Applications
in thread CPAN to install Applications

There are two types of things to install: executables and other things. For executables simply add a scripts key to your hash:
use Module::Build; my $build = Module::Build->new( module_name => 'YourName', # ... script_files => [ qw( your scripts here ) ], #... ); $build->create_build_script;
To do other things takes a bit more work:
my $subclass = Module::Build->subclass( class => 'My::Builder', code => &_custom_code(), ); my $build = $subclass->new( module_name => 'YourName', script_files => [ qw( same as above ) ], #... ); $build->create_build_script; sub _custom_code { return <<'EO_CODE'; sub ACTION_install { # do whatever you want at the end of install } EO_CODE }
Note that shelling out to other scripts is probably not ideal (but is legal). Rather, we code all the file copying, etc in the Build.PL using pure Perl.

Phil