Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^2: How to get at perl's options in a program

by Hercynium (Hermit)
on Dec 28, 2012 at 19:49 UTC ( #1010739=note: print w/replies, xml ) Need Help??

in reply to Re: How to get at perl's options in a program
in thread How to get at perl's options in a program

Thanks, tobyink++!So much of your stuff has either ended up in my code and/or taught me new things I never knew about Perl, I feel I owe you a *case* of beer. Seriously, if we ever meet at a YAPC or Hackathon, I will honor that!

While your module doesn't *quite* solve the problem I came here to research, it points me in the right direction. I've spent some time today groveling in the perl source and found a few more useful variables like that, for example PL_origenviron

I'm working on a means of bootstrapping perl applications using a new perl installation on systems stuck with an old perl, but without needing to run or install external CPAN modules as root. In trying to make this as simple as possible, I have code that, if run with too old a version of perl, attempts to find a new-enough one, and re-execs the original command using the found perl. (Additionally, it will update a perl-version-specific local::lib using cpanm if one of {Makefile,Build}.PL are present, and add it to @INC). Unfortunately, it's a nasty combination of bash and perl, and I'd *love* to dispense with the bash all together.

Now, I know this sort of thing can be "solved" using perlbrew, but unfortunately perlbrew has not worked out very well for the users & devs I am supporting. Also, they dislike having to keep a new installation of perl around for every project. (several are new to perl, and are giving me their time to help me deliver several projects for their groups. I feel I owe it to them to make using and hacking on on my code as comfortable as possible... so far, it's working - two have now expressed that they never knew Perl could be such a nice language to use!)

Once I feel like I have good general solution, I will release whatever I can :)

  • Comment on Re^2: How to get at perl's options in a program

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2022-12-10 04:32 GMT
Find Nodes?
    Voting Booth?

    No recent polls found