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 8762261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:28:55+00:00 2026-06-13T15:28:55+00:00

I have created a Perl module from a .pl file and I am testing

  • 0

I have created a Perl module from a .pl file and I am testing it at the moment. It works until the point where it needs to use another .pl file (to pull out some sql statements). I am calling the file using require 'file.pl';. This is a temporary solution as the .pl file will be replaced in the future by a better database solution, but for now I need to test my module code. It doesn’t like trying to find the file, though, even though I have put the path name in @INC using use lib '/path/to/file'.

Is there any temporary solution I can use to solve this problem? I don’t know when the .pl file will be replaced, so I can’t rely on waiting for that. Should I just move the sql statements into the .pm file even though I will have to remove them later, or do I have to search out the folder that the module is in the put a copy of the .pl file in it?

  • 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-13T15:28:57+00:00Added an answer on June 13, 2026 at 3:28 pm

    You can require the full pathname:

    require '/path/to/file.pl';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created my own Perl module. I reference it from file Config.pm. When
I have a Perl Module that i created and i want to run one
In my Perl script I use the Spreadsheet::WriteExcel module to create an Excel file.
I have this simple base class (Module): package XMSP::File; use parent 'IO::File'; sub new
I have a Perl script that takes user input and creates another script that
I have created 3 classes as following Ext.mine.TextParent - Inherting from Textfield Ext.mine.child.TextChildA -
I'm attempting to move a web app we have (written in Perl) from an
I use h2xs and Module::Starter to create templates for my Perl modules. All these
I have almost no Perl experience but I was wondering if anyone can point
I have this code #!/usr/bin/perl -w use strict; use URI; use LWP::UserAgent; use Data::Dumper;

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.