- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- can I have two different active perl modules for t...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2005 06:47 AM
тАО04-06-2005 06:47 AM
I have perl 5.6 and sybperl version 13 and hpux11.0 on an hp9000.
The versions don't really matter.
The perl interface to sybase was built a while ago. Perl cleaning hooks into the database with sybperl.
But I want a to put in a newer sybase client on this unix box. If I do, the location of $SYBASE will move. This will screw up perl's sybase interface. I've already tried it. I change $SYBASE to a new spot, stuff dies.
If I rebuild everything, I'll bet it will work. But that seems wrong. I would rather have TWO interfaces: sybperl oldway and sybperl newway.
So my question is, can I have TWO perl sybperl interface modules?
Let me be more generic.....
Can there be two different versions of the SAME perl module in one perl? I would like to use a new perl module for the new sybase OCS, without hurting the existing setup. Is this too much to ask?
Now I figure someone on Earth has needed to change a location of a database from directory X to directory Y. When they do this, I would not expect you have to rebuild perl and all modules completely from scratch.
Steve
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2005 07:38 AM
тАО04-06-2005 07:38 AM
Re: can I have two different active perl modules for the same thing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2005 07:58 AM
тАО04-06-2005 07:58 AM
Re: can I have two different active perl modules for the same thing?
You could have two perl 5.6's installed, each with different sybase perl modules (the old in one, and the new in another). Each perl would have a separate execution path.
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2005 01:30 AM
тАО04-07-2005 01:30 AM
Re: can I have two different active perl modules for the same thing?
But it seems a little more than lame that I have to knock myself out to have SYBASE=/spot/sybase and SYBASE_OCS=/spot/sybase/OCS_12_0. Why have the variables at all if changing their values causes the perl module to fail? If it's hardwired in the box, why does it need SYBASE and SYBASE_OCS set? I see this scenario applies to Oracle as well (oracle and opensource nutshell book on my shelf).
I guess it's a HARDwired Variable that can never change. Yet must be set. Perhaps it is not that big of a deal because it's easy to reinstall a module?
If I just reinstall the module with new environment "variables" hardwired to a new fixed value, do I also need to reinstall other modules?
Ah there's the question: Are perl modules independent of each other?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2005 08:16 AM
тАО04-07-2005 08:16 AM
Re: can I have two different active perl modules for the same thing?
If I copy a working copy of sybase ocs to another spot and update the variables, the sybperl.pl test script DOES work.
I also found the errors I have seen are from SYBASE isql, perl is just reporting them.
Thanks for your suggestion about a second copy of perl. That's what I'll try next. I'm going to close this thread soon.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2005 06:09 PM
тАО04-07-2005 06:09 PM
SolutionI have about 6 different DBD-Unify environments for 4 different perl builds and they all work nicely together
If you have the perl tree in /opt/perl/lib, perl already splits up for different versions of perl, so for 5.8.6 you will see /opt/perl/lib/5.8.6 and /opt/perl/lib/site_perl/5.8.6 and so on for each version
Now if you have a different location for your database modules DBI should still reside in the default tree, because it's shared with all DBD's and is not DB version dependant), use something like /appl/sybase/v20/lib/perl/5.8.6 for perl-5.8.6 modules for sybase version 2.0, and then set $PERL5LIB to point to it:
lep a5:/pro/tu/lep/4gl 101 > echo $PERL5LIB
/pro/asql/v82BC/lib/perl
lep a5:/pro/tu/lep/4gl 102 > l !$
l $PERL5LIB
./ ../ 5.6.1/ 5.8.0/ 5.8.3/ 5.8.5/ 5.9.2/
lep a5:/pro/tu/lep/4gl 103 > l $PERL5LIB/*
/pro/asql/v82BC/lib/perl/5.6.1:
./ ../ DBD/ PA-RISC2.0/ auto/
/pro/asql/v82BC/lib/perl/5.8.0:
./ ../ DBD/ PA-RISC2.0/ auto/
/pro/asql/v82BC/lib/perl/5.8.3:
./ ../ DBD/ PA-RISC2.0/ auto/
/pro/asql/v82BC/lib/perl/5.8.5:
./ ../ DBD/ PA-RISC2.0/ auto/
/pro/asql/v82BC/lib/perl/5.9.2:
./ ../ DBD/ PA-RISC2.0/ auto/
lep a5:/pro/tu/lep/4gl 104 >
Now you can run several versions of perl combined with several versions of (the) database(s). I do the same for Oracle and Progres
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2005 01:07 AM
тАО04-08-2005 01:07 AM
Re: can I have two different active perl modules for the same thing?
You have a database at /disk1/mydb.
You have perl at /opt/perl.
You created an empty /disk1/ALT/lib/perl/5.8.6 directory?
Then you set
PERL5LIB=/disk1/ALT/lib/perl/5.8.6?
Then you install the sybperl module?
And after it installs, it puts the files into /disk1/ALT/lib/perl/5.8.6 instead of /opt/perl/lib/5.8.1?
Now to USE the different modules....
To use normal perl, PERL5LIB remains unset.
To use perl with the new sybperl and new sybase, PERL5LIB needs to be preset to /disk1/ALT/lib/perl/5.8.6?
The module I am talking about?
use Sybase::CTlib;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2005 01:26 AM
тАО04-08-2005 01:26 AM
Re: can I have two different active perl modules for the same thing?
I have attached the DBD-Unify and the DBD-Oracle version
Shouldn't be too hard to modify
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2005 02:00 AM
тАО04-08-2005 02:00 AM
Re: can I have two different active perl modules for the same thing?
cd /spotONE
find SOMEDIRECTORY -print | cpio -pdumvc /spotTWO.
I don't see words like: make or make install.
I don't see the current working directory, or the value of $UNIFY.
I expect this is just because you're used to your code, and I'm not.
I also don't see anything like a path where /spotTWO would take precendent of /spotONE.
steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2005 02:13 AM
тАО04-08-2005 02:13 AM
Re: can I have two different active perl modules for the same thing?
what it does is copy all the stuff that 'make install' would have installed to the alternate route instead of in the default perl tree. indeed it's about the cpio you gave, but it tries to be a bit smarter, in that it knows about the perl version
easier *might* be to start a bit different:
# perl Makefile.PL PREFIX=/your/alternate/location
But knowing how MakeMaker works, I somehow never trust that :/
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2005 02:25 AM
тАО04-08-2005 02:25 AM
Re: can I have two different active perl modules for the same thing?
But onto using it....
How would I use have alternate location take precedent over the existing standard?
Using: /my/alt/location
The libraries are at.. /my/alt/location/perl/lib?
I set PERL5LIB=/my/alt/location, or /my/alt/location/perl/lib?
Then run myscript.pl?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2005 02:36 AM
тАО04-08-2005 02:36 AM
Re: can I have two different active perl modules for the same thing?
/pro/asql/v82AC/lib/perl/5.8.6
$ENV{UNIFY} = "/pro/asql/v82AC/lib";
there the scripts creates (if not already there) the subdirectory perl and continues
So for /my/alt/location, there is no "lib" in the path, but you should be pretty safe with starting to set
# env UNIFY=/my/alt/location perl installu.pl
which should create /my/alt/location/perl and all which belongs there
# export PERL5LIB=/my/alt/location/perl
would complete your quest
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2005 02:42 AM
тАО04-08-2005 02:42 AM
Re: can I have two different active perl modules for the same thing?
first I: export PERL5LIB=/my/alt/location/perl
then I: ./use_unify82.ac.pl
Right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2005 02:46 AM
тАО04-08-2005 02:46 AM
Re: can I have two different active perl modules for the same thing?
(might be the shortest possible answer I ever gave :) )
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2005 06:36 AM
тАО04-08-2005 06:36 AM
Re: can I have two different active perl modules for the same thing?
Perl Cookbook, section 12.7 Keeping You Own Module Directory. Page 413.
It repeats what you told me.
steve.