Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8334371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:19:39+00:00 2026-06-09T03:19:39+00:00

I’ve taken over a project written in Perl that has a few dependencies such

  • 0

I’ve taken over a project written in Perl that has a few dependencies such as Template::Toolkit, Image::ExifTool, and GD to name a few. Currently, these dependencies are built into a directory (“deps” folder) using the --prefix option in make. In the main Perl script, I have something like the following to import the necessary modules:

use File::Spec::Functions qw(catdir);
use lib "lib";
use lib catdir(qw(deps lib perl5 site_perl));

catdir is used to stray away from certain system requirements (such as assuming ‘/’ is the folder separator; if someone has another alternative, I’m open to suggestions!). The “lib” folder contains my modules, and the “deps/lib/perl5/site_perl” folder is where my dependencies were installed on my original machine.

However, after building the dependencies on another machine, it seems the needed libraries have moved around to different folders. I now need to use these statements for my script to run correctly:

use File::Spec::Functions qw(catdir);
use lib "lib";
use lib catdir(qw(deps lib perl 5.14.2));
use lib catdir(qw(deps share perl 5.14.2));

I was wondering if there was anyway specify the prefix directory (“deps”) and have the use lib pragma recursively search through that directory for my dependencies. Also, the users of this script do not have access to the Internet, so compiling my project as a CPAN module would be counterproductive.

Thanks for all the help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:19:41+00:00Added an answer on June 9, 2026 at 3:19 am

    Use INSTALL_BASE for the Makefile.PL and –install_base for Build.PL when installing modules. They provide stable install locations. PREFIX and –prefix try to emulate how perl has its system libraries laid out and is more useful for making packages.

    Also you’ll want to run rel2abs over the path before feeding it to lib to give you an absolute path. This will protect you in case your code chdirs and then tries to require a module. Or you can use lib::abs.

    And ikegami is correct, it’s unnecessary to make the file paths passed to lib portable. Just pass them in Unix style. Perl will figure it out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
In my XML file chapters tag has more chapter tag.i need to display chapters
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.