brianarn has asked for the wisdom of the Perl Monks concerning the following question:

Hello all,

Sorry to be a bit off-topic. The only reason I even feel okay posting this is because I'm asking indirectly about CGI scripts in Perl.

I've been writing scripts in Perl for some time and testing them on my Win2K/XP boxes using ActiveState and the Win32 port of Apache - but as can be expected, anytime I do anything with files, I have to code it twice - my webhost runs Red Hat 7.1, so I have to change file paths, etc.

Now, there's a module from CPAN that I want to use, that ActiveState hasn't ported. I'm curious if anyone has ran Apache under Cygwin and used Cygwin's Perl in conjunction with it, and what their experiences have been. I'm going to be trying it myself, but I may as well ask to see if someone has gone before me in this path.

Thanks. :)

~Brian
  • Comment on (Semi-OT) Win32 Apache & ActiveState vs. All Cygwin

Replies are listed 'Best First'.
Re: (Semi-OT) Win32 Apache & ActiveState vs. All Cygwin
by dvergin (Monsignor) on Jan 26, 2002 at 00:30 UTC
    I have to code it twice - my webhost runs Red Hat 7.1, so I have to change file paths, etc.

    That way lies madness...

    Have you considered having a config file of some kind that encapsulates the differences between the two servers and then reading in those server-dependent values rather than coding them into the script?

    It's a small nuisance to set up and a big time and sanity saver in the long run.
     

      I agree with dvergin. You also might want to consider using %ENV values, for the most part everything you want about the server configuration can be gotten from there as far as paths. Custom paths for your application should be in a conf file of some kind.
Re: (Semi-OT) Win32 Apache & ActiveState vs. All Cygwin
by Moonie (Friar) on Jan 26, 2002 at 00:32 UTC
    I haven't had any experience with Cygwin, but Apache does have a site on using Cygwin with Apache here. You may want to take a look at it.
    - Moon