I’ve acquired an outdated MBP that is maxed out at MacOS 10.15.7 / Catalina, and I am attempting to make use of it as an online server able to working Perl CGI scripts. Moreover, I wish to serve pages from ~/Websites; I wish to run the scripts with Perl 5.38, which I’ve put in beneath my dwelling listing with perlbrew; I wish to entry the server from one other machine on my LAN (i.e., not merely a localhost-only resolution).
One complication is that homebrew not formally helps Catalina, so I have to keep away from attempting a homebrew resolution, and as a substitute use Catalina-supplied issues as a lot as attainable (other than Perl).
I’ve managed to seek out sufficient directions for configuring /and so forth/apache2/* in order that pages are served from ~/Websites, and I can entry them from a special machine on the LAN. I’ve additionally been capable of entry a Perl script, ~/Websites/howdy.pl:
#!/Customers/chap/perl5/perlbrew/perls/perl-5.38.0/bin/perl
print "<html>";
print "<head>";
print "<title>Whats up, World!</title>";
print "</head>";
print "<physique>";
print "<h1>Whats up, World!</h1>";
my $model = $^V;
print "Perl model: $versionn";
print "</physique>";
print "</html>";
The output, once I browse http://retsina.native/howdy.pl, is:
Whats up, World!
Perl model: v5.18.4
So clearly the shebang line is not being learn, and I want to inform Apache to execute perl from a special location.
Additionally, as soon as I’ve that working, I count on there shall be much more gotchas when I attempt to execute the true Perl script, which I’ve developed and examined in my own residence listing whereas logged into my shell, with my very own ENV, and so forth.
Can somebody present some steering right here? I apologize for the shortage of specificity — that is largely black magic to me. Glad to supply extra particulars as requested.
Leave a Comment