Friday, March 4, 2011

Mac OSX and CGI.pm

"I'm NOT a web developer!"  I've been saying that a lot lately.  Even so, because I have done a bit of LDAP programming and they needed a web interface, I wrote a quick hack which turned into a big, long painful project.  The biggest issue is so many things don't work the same (or at all) on Mac OSX.  OpenLDAP, for instance (a whole other story). [It should be noted - I'm also not a Mac guy.]

Dilbert.com

I tried for several days to get CGI.pm redirects and refreshes to work but kept getting Error 302's.  I found lots of people with the same issue on the Mac.   Finally - someone said "You'll have to write it without CGI.pm because it doesn't 100% work on the Mac (and/or maybe the Apple Apache config was incriminated).  Anyway, I rewrote the redirects without CGI.pm (ugly, inelegant Perl 4ish looking code) and it worked fine.

Since I never exactly found the answer - I want to state for future folks looking for an answer - "IT DOESN'T WORK RIGHT ON A MAC" (this phrase can be re-used for a great many things).  And, if I'm wrong (because, remember, I'm not a web developer) it'd be great for someone to comment with the right answer.

I'll probably get comments such as "You're using CGI.pm for web development?!  Are you from the past?!" To this I would say "Yes I am".