On 12-06-02 03:11 PM, Chris Nehren wrote:
On Sat, Jun 02, 2012 at 15:01:21 -0400 , Shawn H Corey wrote:
On 12-06-02 02:54 PM, sono...@fannullone.us wrote:
Chris,
Yes, the `#!/usr/bin/env perl` shebang should do. I've used it with perlbrew
myself.
How are you getting that to work? When I try it, it uses the
version of Perl located at /usr/bin/perl, not the version that's
selected with perlbrew.
Marc
This only works from a terminal since your .profile is run when the
terminal starts. From a CGI or cron(1) job, it runs the OS-installed
version.
Surely you can put the relevant lines into your crontab or web server
config, or use a wrapper script that sources things? This is Not Hardâ„¢.
Don't know; never tried it. It might work. Here the code from my .profile
# perlbrew
if [ -e ~/perl5/perlbrew/etc/bashrc ]
then
source ~/perl5/perlbrew/etc/bashrc
fi
Of course, if you use `perlbrew switch ...` or `perlbrew switch-off`
then this immediately effects any cron(1) or CGI that is started after
the switch. This is what you want if you just installed an new version
but you can no longer use perlbrew to switch back to a previous version
to test a script.
--
Just my 0.00000002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
_Perl links_
official site : http://www.perl.org/
beginners' help : http://learn.perl.org/faq/beginners.html
advance help : http://perlmonks.org/
documentation : http://perldoc.perl.org/
news : http://perlsphere.net/
repository : http://www.cpan.org/
blog : http://blogs.perl.org/
regional groups : http://www.pm.org/
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/