Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^4: Modifying %ENV From The Shebang Line

by djp (Hermit)
on Jul 07, 2010 at 02:55 UTC ( #848371=note: print w/replies, xml ) Need Help??


in reply to Re^3: Modifying %ENV From The Shebang Line
in thread Modifying %ENV From The Shebang Line

This is great, I used this to execute the perl installed with Oracle. Oracle is installed under $ORACLE_HOME, which can be set dynamically depending on the Oracle SID.
#!/usr/bin/perl use strict; use warnings; # Voodoo magic to run under Oracle Perl, for DBI. # See http://www.perlmonks.org/?node_id=657563. BEGIN { die "ORACLE_HOME not set\n" unless $ENV{ORACLE_HOME}; unless ($ENV{OrAcLePeRl}) { $ENV{OrAcLePeRl} = "$ENV{ORACLE_HOME}/perl"; $ENV{PERL5LIB} = "$ENV{PERL5LIB}:$ENV{OrAcLePeRl}/lib:$ENV{OrA +cLePeRl}/lib/site_perl"; $ENV{LD_LIBRARY_PATH} = "$ENV{LD_LIBRARY_PATH}:$ENV{ORACLE_HOM +E}/lib32:$ENV{ORACLE_HOME}/lib"; exec "$ENV{OrAcLePeRl}/bin/perl", $0, @ARGV; } } use DBI; ...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://848371]
help
Chatterbox?
[moritz]: seems there's a size limit for hostenum, and the error message just sucks
[vrk]: None, other than the location of the error: auto/NetAddr/IP/ _splitref.al
[vrk]: Aha, there's a reference to "bug report 82719" in NetAddr/IP.pm's sub _splitref.
[moritz]: wow, that's their idea of an "improved error message"
[moritz]: how about "This network is too large to enumerate all host addresses." or so?
[vrk]: Well, there's a call to notcontiguous() before the error, whose description is "counts the bit positions remaining in the mask when the rightmost '0's are removed"
[vrk]: Clear as mud!

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2017-04-25 07:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (449 votes). Check out past polls.