Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Installing a script

by Anonymous Monk
on Aug 24, 2009 at 06:57 UTC ( #790759=note: print w/replies, xml ) Need Help??


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

not what to install.

Astroboy answered the first part of the question (EXE_FILES) himself. INSTALLSCRIPT/prompt answers the second part.

PL_FILES is completely unrelated.

PL_FILES is simply important; It needs to be managed. Many (even the initiated) overlook that it will install your demo.pl /example.pl /generatefoo.pl into the module tree by default.

Sometimes you need to read the question closely.

Thank you

Replies are listed 'Best First'.
Re^4: Installing a script
by ikegami (Pope) on Aug 24, 2009 at 07:00 UTC
    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.
      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; } } }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://790759]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2018-06-22 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (124 votes). Check out past polls.

    Notices?