Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Installing WWW::Mechanize on AIX - The battle

by perl_monster (Novice)
on Jul 06, 2012 at 18:12 UTC ( #980345=note: print w/ replies, xml ) Need Help??


in reply to Re: Installing WWW::Mechanize on AIX - The battle
in thread Installing WWW::Mechanize on AIX - The battle

Yes Perl 5.3 is severely old, and yes it is Oracle's private perl in AIX. I am sure they won't support external PMs (except DBD and DBI, or maybe not). I was able to successfully install a couple of external modules like XML::XPath and Net::Stomp to Oracle perl but WWW::Mechanize seems to have a whole lot of dependencies. I can use AIX's perl installation to get Mechanize in, but the problem is the job scheduler we use, uses Perl profile set for Oracle Perl only, so in order to be able to run a program using AIX perl we will end up creating a new profile.


Comment on Re^2: Installing WWW::Mechanize on AIX - The battle
Re^3: Installing WWW::Mechanize on AIX - The battle
by Tanktalus (Canon) on Jul 06, 2012 at 18:53 UTC

    5.8.3, not 5.3 :-) I'm guessing it already comes with DBI and DBD::Oracle.

    Now you're running into a few other issues that take a bit more to resolve. Again, I'll reiterate: install a private perl. And then we can more or less resolve the rest of the issues.

    Let's say you install perl 5.16.0. Depending on how your environment is set by the job scheduler, different solutions may present themselves. If, for example, it simply puts Oracle's perl first in the PATH, you can just put your first line to be:

    #!/opt/myperl/5.16.0/bin/perl
    and everything is fine after that. However, if your code is actually being run directly by a hardcoded-in-the-scheduler perl, that is it's running /u01/oracle/product/10.2.0/perl/bin/perl $yourscript directly, it's a bit more convoluted. My suggestion would be to write a wrapper (in perl 5.8.3 syntax). Roughly something like this:
    #! perl # delete $ENV{...} to clean up the environment if needed exec {$0} "$0-wrapped", @ARGV;
    And then have a -wrapped version of the file with your real code in it that starts with the appropriate line above in it. This will have the job scheduler launching the Oracle perl which then reads this file, and it will then tell the kernel (AIX) to execute another program in its place. The kernel will read the magic number from the new program ("#!") and interpret it as a script that needs interpretation, read the rest of the line for the interpreter, and then run that. So it's a bit of an annoyance, but it should all run quick enough not to be noticed.

    And, as a bonus, you'll be able to use the new features in newer perls. Like 5.8.8. :-P

      Sorry that was a typo... I meant 5.8.3. Having another Perl installation will sure solve the problem but its a long shot to get a new version of Perl installed in the live production system, especially just for one program. The Sysadmins are suggesting that we use the existing perl Installations. The job scheduler is very flexible so I am not so concerned about running a program with new settings on it, but the only thing that is pressing is the perl Installation. I guess I will give the AIX perl installation a shot.. Thanks for your help!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://980345]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (12)
As of 2014-07-22 21:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (128 votes), past polls