473,324 Members | 2,511 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Module Question


I have a question about finding a module at rutime.

Here's what I would like to do.

push(@INC, @notknowntillrunning);

use lib 'notknowntill running';

use foo;

My problem is I do not know the where the Module will be till the script
runs. Perl won't compile the script because at time of compilation the
enviroment is not known.

This is a corporate computing environment and I can't change the value of
@INC before running my script. (It's a policy thing.)

Any ideas on how to get the same effect?

Wayne
Jan 8 '06 #1
1 2311
>>>>> "Wayne" == Wayne Happ <wh***@comcast.net> writes:

Wayne> Any ideas on how to get the same effect?

First, comp.lang.perl has been dead for ten years. You probably
want comp.lang.perl.misc instead.

Second, you haven't said *how* you would determine the location of
the module. But maybe this will help:

BEGIN {
my $module_location = magical_function_or_sequence_you_did_not_describe( );
push @INC, $module_location;
}

use Module::Found::In::Extra::Location;

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<me****@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Jan 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: N.K | last post by:
Hi , Python's existing cookie module doesnt supports new cookie headers SetCookie2 , How to submit a patch for that ? I tried emailing person who owns that module.But no response. Thanks,...
0
by: mg | last post by:
Hi everybody... I am using Python API in order to create bindings. So, in the init function of my module, I create constants : PyMODINIT_FUNC initMyModule( void ) { PyObject* module =...
10
by: Bonzol | last post by:
vb.net Hey there, could someone just tell me what the differnce is between classes and modules and when each one would be used compared to the other? Any help would be great Thanx in...
9
by: Rudy | last post by:
Hello All! I'm a little confused on Public Class or Modules. Say I have a this on form "A" Public Sub Subtract() Dim Invoice As Decimal Dim Wage As Decimal Static PO As Decimal Invoice =...
6
by: JonathanOrlev | last post by:
Hello everyone, I have a newbe question: In Access (2003) VBA, what is the difference between a Module and a Class Module in the VBA development environment? If I remember correctly, new...
0
ADezii
by: ADezii | last post by:
The motivation for this Tip was a question asked by one of our Resident Experts, FishVal. The question was: How to Declare Default Method/Property in a Class Module? My response to the question was...
4
by: Peter J. Bismuti | last post by:
I'm having trouble understanding how namespaces work in modules. I want to execute a module within the interpreter and then have values that are calculated persist so that other modules that get...
3
by: james | last post by:
Hi all, I did some quick searching but I haven't found anything like I want. It probably has to do with the terms I am searching for so if I describe what I want then I hope someone can point me...
22
by: ben mitch | last post by:
Hi I hope you'll see this cross-post (c/c++) as appropriate. I also admit immediately that the question *may* turn out to be compiler-/os-specific, in which case I apologize. But I wonder if...
2
by: Joe Strout | last post by:
Some corrections, to highlight the depth of my confusion... On Nov 11, 2008, at 9:10 PM, Joe Strout wrote: Actually, it does not. And no, it isn't; it's the NAME of the module the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.