Gossamer Forum
Home : General : Perl Programming :

Dynamic 'use lib' call?

Quote Reply
Dynamic 'use lib' call?
Hi. I'm basically trying to load the Perl module 'lib' dynamically. I currently have;

use lib $installation;

I also tried;

use lib "$installation";

use lib '$installation'; (which obviously didn't work, as the '' stops $installation being processed).

.... is this even possible? I am basically trying to get a script to interlink with several installations of LinksSQL... so after passing the path to the 'defs' folder, I then use;

Code:
use lib $installation;
use GT::SQL;
my $db = new GT::SQL $installation;

Anyone got any ideas? This is doing my head in :(

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Dynamic 'use lib' call? In reply to
Been there, done that...

http://www.gossamer-threads.com/...i?post=191335#191335

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Dynamic 'use lib' call? In reply to
Thanks, I'll take a look at that Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!