Loading ...
Sorry, an error occurred while loading the content.

Re: Porting from ActivePerl/IIS to Apache::ASP

Expand Messages
  • Joshua Chamas
    ... Besides Warren s excellent response to your original email, I would like to add a few things... ... Consider the alternative to caching things where
    Message 1 of 5 , Jul 16, 2004
      Quoting Warren Young <warren@...>:

      > Unknown wrote:
      > > Our problem is the original authors of the code assumed variables are
      > > not globally scoped.
      > You mean one of the original authors doesn't understand Perl.

      Besides Warren's excellent response to your original email, I would like to add
      a few things...

      > > Q1.1: How come in other languages, the scope of the variable is
      > > assumed to be for the page unless
      > > defined otherwise (e.g. PHP, ActivePerl, VBScript)?
      > First, drop ActivePerl from that. That's a different issue entirely.
      > Second, the reason has to do with Perl's history, but it's really not
      > important to argue about it here -- do that on comp.lang.perl.misc.

      Consider the alternative to caching things where globals and such persist, the
      cost and overhead to resetting things things can be expensive. If you really
      want things to be cleaner, you can set NoCache 1 which will at least recompile
      scripts each time.

      > > Q1.2: Is there a configuration option or easy way around this issue?

      Settings "UseStrict 1" is a great way to find out which one of your scripts has
      variables incorrectly declared.

      > Yes. Put it in a Perl module instead, and either "use MyModule" from
      > each ASP file that needs the routine, or "use" the module in global.asa.

      You can also move the subs to the global.asa for auto import to your scripts.

      > The main downside of this is that you will have to restart Apache each
      > time you change one of the Perl modules, since Apache::ASP won't
      > recompile the scripts when a module changes.

      Try also Apache::Reload and StatINC settings to deal with the reload issue while



      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    Your message has been successfully submitted and would be delivered to recipients shortly.