Tag Archives: mac

Web Applications on a Mac: Using The CGI Module

CGI is a Perl module that makes common tasks in web apps easier.  To be frank, I have usually used it in conjunction with CGI::Application, but it is useful to know how to access it directly. My mac already had the CGI module installed.  I verified this by typing the following commands: perl use CGI; [...]
Posted in Software Development | Also tagged , | Leave a comment

Web Applications on a Mac: Template Toolkit

Template Toolkit is useful when you need a Perl script to output HTML.  Instead of inline-ing the html code in Perl, an external template file is used.  Your script can pass variables and objects to the template, and they will be interpolated into the resulting html. Step 1) install template toolkit sudo cpan -i Template [...]
Posted in Software Development | Also tagged , , | Leave a comment

Web Applications on a Mac: hello world perl CGI

Step 1) enable web sharing a.k.a. Apache web server: go to system preferences => sharing, and click Web Sharing Step 2) make sure Apache is running by going to the address ‘http://localhost’ in your browser. You should see the message “It Works.” Step 3) In the default setup,  http://localhost/cgi-bin is aliased to the directory /Library/WebServer/CGI-Executable, [...]
Posted in Software Development | Also tagged , | Leave a comment

Enabling Execution of CGI’s In ‘docroot’ (OS X)

First, I moved my f***ing docroot to /var/www where its supposed to be.  Second, because I am developing scripts, I turned Indexes on and ExecCGI on for that directory.   After an hour of frustration where perl scripts would download but not execute, I finally found this article that clued me in to the fact that [...]
Posted in Software Development | Also tagged | Leave a comment