Which Perl files (other than modules) are used by a script?

Discussion in 'Perl Misc' started by Jonathan Gowland, Sep 13, 2003.

  1. I'm writing a software installer (in Perl, of course) which is
    intended to run from a CD. Because it may be used on customer systems
    where they don't have Perl installed (shame on them, I know, but they
    pay the bills), I need to put enough of the Perl runtime environment
    on the CD to allow the installer program to run. And because the
    installer program is likely to be enhanced in future, with the use of
    extra modules, I want to be able to generate the list of supporting
    files (.pm files, shared libraries, etc.) automatically. Although I
    can test (and have tested) things by temporarily renaming the
    directory holding the system's Perl libraries, we support around six
    different UNIX and Linux systems, so I'm after a method that can tell
    me what needs to go onto the CD before I test it.

    Using %INC, I can determine the list of module files nicely. To find
    out which shared libraries are needed, I thought I could use
    @DynaLoader::dl_modules, but on some platforms (e.g. Linux with Perl
    5.6.1) this array is empty. (Any ideas?) So as a fallback, I look
    under $Config{archlibexp} for any shared libraries whose name matches
    a module in %INC. This seems to work for all platforms except one.
    On Solaris 7 with Perl 5.005_03, when I run using the cut-down
    environment, I get:

    Can't locate auto/DynaLoader/dl_findfile.al in @INC (@INC contains
    ...

    So is there a better way to determine which shared library and other
    non-module files are needed by a script?
    Jonathan Gowland, Sep 13, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    675
  2. Steve Mauldin
    Replies:
    0
    Views:
    125
    Steve Mauldin
    Feb 6, 2004
  3. ngoc
    Replies:
    7
    Views:
    162
    zentara
    Jul 14, 2005
  4. garey
    Replies:
    3
    Views:
    150
    Joe Smith
    May 29, 2007
  5. Replies:
    3
    Views:
    177
    Josef Moellers
    Nov 1, 2007
Loading...

Share This Page