perl\site\lib\auto\... (DLLs, LIB, EXP etc) to another location under your dev directory?

Discussion in 'Perl Misc' started by Kenjis Kaan, Jun 29, 2003.

  1. Kenjis Kaan

    Kenjis Kaan Guest

    Would it be possible to move support files under
    perl\site\lib\auto\... (DLLs, LIB, EXP etc) to another location
    under your dev directory? I am developing perl applications that will
    then be pushed down to end users PC as a package. I need to make this
    package self contained so that when it sits on the client PC it can be
    run right away. The problem is that there is only a basic Perl
    installation on the end users PC with non of the fancy modules
    installed. So I would like to be able to create my application in
    such a way that I can put the DLLs/LIB of the package in the current
    directory, as well as the module.pm itself. I wonder if perl will
    allow you to do that. I notice whenever I install a package, it puts
    all the DLLs,LIB files into the perl\site\lib\auto directory. I don't
    want ot have to go and install various package on thousands of PCs
    before an application can be run. There has to be a way so that you
    can put the DLLs eg. DB_File.dll and DB_File.lib inside the current
    development directory containing the codes I am developing. So when I
    hand the complete product over to who ever use it, the thing will run
    right away. You just can't expect end user to know how to install
    perl packages.
    Kenjis Kaan, Jun 29, 2003
    #1
    1. Advertising

  2. Kenjis Kaan

    Randy Kobes Guest

    "Kenjis Kaan" <> wrote in message
    news:...
    > Would it be possible to move support files under
    > perl\site\lib\auto\... (DLLs, LIB, EXP etc) to another location
    > under your dev directory?

    [ ... ]
    If your users are running ActivePerl, you can create a ppm package
    (http://aspn.activestate.com/ASPN/docs/ActivePerl/faq/ActivePerl-faq2.html)
    which users can install with the ppm utility. Alternatively, after
    building the package, you could distribute the blib/ directory,
    which users can then include as, eg, 'perl -Mblib ...'.

    best regards,
    randy kobes
    Randy Kobes, Jun 29, 2003
    #2
    1. Advertising

  3. Kenjis Kaan

    Kenjis Kaan Guest

    "Randy Kobes" <> wrote in message news:<P2DLa.20131$>...
    > "Kenjis Kaan" <> wrote in message
    > news:...
    > > Would it be possible to move support files under
    > > perl\site\lib\auto\... (DLLs, LIB, EXP etc) to another location
    > > under your dev directory?

    > [ ... ]
    > If your users are running ActivePerl, you can create a ppm package
    > (http://aspn.activestate.com/ASPN/docs/ActivePerl/faq/ActivePerl-faq2.html)
    > which users can install with the ppm utility.


    > Alternatively, after
    > building the package, you could distribute the blib/ directory,
    > which users can then include as, eg, 'perl -Mblib ...'.
    >
    > best regards,
    > randy kobes


    Thanks for you reply. How would you do this second alternative, ie
    distribute the blib/ directory. I guess when you say blib/ you mean
    /perl/site/lib
    I am in fact using ActivePerl 5.6.x
    Kenjis Kaan, Jun 29, 2003
    #3
  4. Kenjis Kaan

    Sisyphus Guest

    "Kenjis Kaan" <> wrote in message
    news:...
    > "Randy Kobes" <> wrote in message

    news:<P2DLa.20131$>...
    > > "Kenjis Kaan" <> wrote in message
    > > news:...
    > > > Would it be possible to move support files under
    > > > perl\site\lib\auto\... (DLLs, LIB, EXP etc) to another location
    > > > under your dev directory?

    > > [ ... ]
    > > If your users are running ActivePerl, you can create a ppm package
    > >

    (http://aspn.activestate.com/ASPN/docs/ActivePerl/faq/ActivePerl-faq2.html)
    > > which users can install with the ppm utility.

    >
    > > Alternatively, after
    > > building the package, you could distribute the blib/ directory,
    > > which users can then include as, eg, 'perl -Mblib ...'.
    > >
    > > best regards,
    > > randy kobes

    >
    > Thanks for you reply. How would you do this second alternative, ie
    > distribute the blib/ directory. I guess when you say blib/ you mean
    > /perl/site/lib
    > I am in fact using ActivePerl 5.6.x


    No, the 'blib' is created when you build a module from source.

    for(@INC) {print $_, "\n"}

    If you run that you'll normally find that there are 3 @INC folders - your
    '/perl/lib/' folder, your '/perl/site/lib/' folder, and '.', which is the
    current working directory.

    If you're script uses a module called Bogus::Rubbish, then perl will look
    for Rubbish.pm in the '$INC[0]/Bogus/' folder, then the '$INC[1]/Bogus/'
    folder, and lastly the '$INC[2]/Bogus/' folder (ie './Bogus/').

    It will look for Rubbish.dll in the
    '$INC[0]/auto/Bogus/Rubbish/' folder, then the
    '$INC[1]/auto/Bogus/Rubbish/' folder, and lastly in the
    '$INC[2]/auto/Bogus/Rubbish/' folder.

    So you would need to ensure that Rubbish.pm and Rubbish.dll are installed in
    one of those locations on the user's PC.

    Alternatively you could insist that the user place Rubbish.pm in
    'C:/some_folder/Bogus/' and Rubbish.dll in
    'C:/some_folder/auto/Bogus/Rubbish/' - and include in the script that they
    are running:
    use lib 'C:/some_folder';

    (see perldoc lib.)

    Hth.

    Cheers,
    Rob
    Sisyphus, Jun 29, 2003
    #4
  5. Kenjis Kaan

    Randy Kobes Guest

    "Kenjis Kaan" <> wrote in message
    news:...
    > "Randy Kobes" <> wrote in message

    news:<P2DLa.20131$>...
    > > "Kenjis Kaan" <> wrote in message
    > > news:...
    > > > Would it be possible to move support files under
    > > > perl\site\lib\auto\... (DLLs, LIB, EXP etc) to another location
    > > > under your dev directory?

    > > [ ... ]
    > > Alternatively, after
    > > building the package, you could distribute the blib/ directory,
    > > which users can then include as, eg, 'perl -Mblib ...'.

    >
    > Thanks for you reply. How would you do this second alternative, ie
    > distribute the blib/ directory. I guess when you say blib/ you mean
    > /perl/site/lib
    > I am in fact using ActivePerl 5.6.x


    As Rob mentioned, the blib directory is created within
    the package's source directory upon building. This isn't
    meant to be a permanent solution, but in principle, what
    you could do is transfer the entire blib directory to some other
    machine (which runs the same Perl version as the original),
    and then run your script as
    perl -Mblib your_script
    or
    perl -Mblib=dir your_script
    depending on where you put the blib directory. This adjusts
    @INC so as to include the appropriate directories under blib.
    See 'perldoc blib' for more details.

    best regards,
    randy
    Randy Kobes, Jun 29, 2003
    #5
    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. davidw
    Replies:
    2
    Views:
    543
    Brock Allen
    May 30, 2005
  2. linkswanted
    Replies:
    1
    Views:
    886
  3. Kevin Walzer

    Re: PIL (etc etc etc) on OS X

    Kevin Walzer, Aug 1, 2008, in forum: Python
    Replies:
    4
    Views:
    374
    Fredrik Lundh
    Aug 13, 2008
  4. Sio99
    Replies:
    1
    Views:
    297
    Sio99
    Jun 15, 2009
  5. Feyruz
    Replies:
    4
    Views:
    2,135
    Sherm Pendley
    Oct 14, 2005
Loading...

Share This Page