in reply to Re^3: Installing a script
in thread Installing a script

PL_FILES is a means of specifying scripts that are executed during the installation process. For example, I used it to identify a script that compiles WSDL files into SOAP::Lite classes during installation. It has nothing to do with causing scripts to be installed or with preventing scripts from being installed. It has nothing to do with installing scripts at all.

Replies are listed 'Best First'.
Re^5: Installing a script
by Anonymous Monk on Aug 24, 2009 at 07:32 UTC
    I can admit when I am wrong. Right after the PL_FILES option is the PM options which does control that.

      If EXE_FILES works, I'd use that.

      The problem with PM is that if you use it, it prevents automatic discovery of (other) .pm files. I had to add to some generated .pm files to PM and I didn't want to list all the static .pm files, so I added the following to Makefile.PL:

      BEGIN { package MY; use File::Spec::Functions qw( catdir catfile ); sub init_PM { my $self = shift; $self->SUPER::init_PM(@_); my @path = qw( ... ); my $src_base = catdir('lib', @path); my $dst_base = join('$(DIRFILESEP)', '$(INST_LIB)', @path); for (...) { my $src = catfile( $src_base, "$_.pm"); my $dst = join('$(DIRFILESEP)', $dst_base, "$_.pm"); $self->{PM}{$src} = $dst; } } }

      So to add a .pl, you'd use

      BEGIN { package MY; use File::Spec::Functions qw( catdir catfile ); sub init_PM { my $self = shift; $self->SUPER::init_PM(@_); my $src_base = 'bin'; my $dst_base = '$(INSTALLSCRIPT)'; for ('script.pl', ...) { my $src = catfile( $src_base, $_); my $dst = join('$(DIRFILESEP)', $dst_base, $_); $self->{PM}{$src} = $dst; } } }