use lib relative pathnames - redux

Ask a Question related to PERL Modules, Design and Development.

  1. #1

    Default use lib relative pathnames - redux

    Hello,

    I'm trying to use libraries that are relative to the perl module or
    script that's being called.

    The below code will not work
    use lib '../lib'
    if I execute the script from a different drive letter, or from a
    different directory in Windows.

    I found this thread from 8 years ago: [url]http://tinyurl.com/drsoh[/url]

    Some people were going to use the following code:

    use lib File::Basename::dirname(__FILE__) . "../lib";

    Is there a more up to date solution?

    Thanks,
    --Nate

    Tookelso@yahoo.com Guest

  2. Similar Questions and Discussions

    1. Guard page issue - redux
      Contribute has the client's site open, with the index.html page displayed, and tells me that it cannot find a 'guard page', giving examples of...
    2. compact flash redux
      There was quite a long thread here back in about May about the relative merits of a regular compact flash 256 card vs the "ultra" or high speed ones....
    3. relative pathnames for chunks
      Anyone know if it is OK to use a relative path to chunks. I have links to my raw devices in $INFORMIXDIR/links. I would like to use a path...
    4. Disappearing bounding box Redux
      On June 3, a fellow user posted a tale of disappearing bounding box. The solution was simple: toggle the show/hide options on the menu....
    5. Site relative or document relative links prob.
      Hi everyone, I have currently developed a new site within a sub directory of a site. I have used document relative links to test the site online...
  3. #2

    Default Re: use lib relative pathnames - redux

    [email]Tookelso@yahoo.com[/email] wrote:
    > Hello,
    >
    > I'm trying to use libraries that are relative to the perl module or
    > script that's being called.
    >
    > The below code will not work
    > use lib '../lib'
    > if I execute the script from a different drive letter, or from a
    > different directory in Windows.
    >
    > I found this thread from 8 years ago: [url]http://tinyurl.com/drsoh[/url]
    >
    > Some people were going to use the following code:
    >
    > use lib File::Basename::dirname(__FILE__) . "../lib";
    >
    > Is there a more up to date solution?
    Don't know about up to date, but I used this one in the past:
    [url]http://search.cpan.org/~nwclark/perl-5.8.7/lib/FindBin.pm[/url]


    --
    John Small Perl scripts: [url]http://johnbokma.com/perl/[/url]
    Perl programmer available: [url]http://castleamber.com/[/url]
    I ploink googlegroups.com :-)

    John Bokma Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139