How to copy files using Makefile.PL and ExtUtils :: MakeMaker?

I am developing a library and scripts in perl. For distribution I use ExtUtils::MakeMaker, I have some configuration files and data in the directory named datain the propagation path, for example, the configuration file data/config.iniand data files, such as: data/inv01.stb. The following is part of the code Makefile.PL:

use ExtUtils::MakeMaker;

my $inifile = 'data/config.ini';
my @data    = <data/*.stb>;    

WriteMakefile(
  NAME => 'Mymodule',
  VERSION_FROM   => 'lib/Mymodule.pm',
  PREREQ_PM  => {
    'Time::HiRes' => 0,
    'Storable'    => 0,
    'File::Path', => 0,
    'File::Copy', => 0,
    'Digest::CRC', => 0,
    'Digest::MD5', => 0,
    'Archive::Tar', => 0,

  },
  EXE_FILES => [ qw(scripts/check_requests.pl  scripts/proc_requests.pl scripts/send_requests.pl) ],
  'clean' => {FILES => clean_files()},
);

# Delete *~ files 
sub clean_files {      
  return join(" ", "*.out", "*~", "data/test/*");
}

How to configure Makefile.PLto copy these files to a non-standard directory.

thanks for the help

+3
source share
1 answer

Why not use EXE_FILES? In the end, they will not be tested for performance.

+1
source

All Articles