WeBWorK Main Forum

configure which perl

configure which perl

by Alex Jordan -
Number of replies: 1

Is there a way to configure WeBWorK to use a perl installation that is not the system perl? I manage two servers that are old and have other things running on them too, and I cannot mess with the old system perl. I'm thinking for example to use perlbrew to install a new version of perl, but then leave the operating system using the original version. And then somehow tell WeBWorK to use the newer perl version. I looked in various config files for version 2.18, but I don't see that we have this possible.

In reply to Alex Jordan

Re: configure which perl

by Danny Glin -

If I understand this correctly, you should be able to edit the first line of /opt/webwork/webwork2/bin/webwork2.  The line

#!/usr/bin/env perl

indicates that the script should be run using the version of perl found in the system path.  If you replace that with


it will run the script using the perl you specify.  If you run any of the command line scripts you'll either have to do the same or explicitly load them using your custom perl.

No guarantees that there aren't other places that this is hard-coded, but hopefully this gets you started.