in reply to Bareword "Apache2::Const::REDIRECT" not allowed while "strict subs" in use

You may need to add () , like so:
return Apache2::Const::REDIRECT();
Good luck!
  • Comment on Re: Bareword "Apache2::Const::REDIRECT" not allowed while "strict subs" in use
  • Download Code

Replies are listed 'Best First'.
Re^2: Bareword "Apache2::Const::REDIRECT" not allowed while "strict subs" in use
by thcsoft (Monk) on May 03, 2005 at 09:52 UTC
    hmm... i tried using the ampersand &Apache2... - with the only result, that now i got a runtime-error instead of a compile-time one.

    language is a virus from outer space.

      An ampersand is not the same thing as parens to mark something as a function. An ampersand marks it as being a local subroutine. When you're using something from a module, you'll want to use parens:

      Apache2::Const::REDIRECT()

      You could also import 'REDIRECT', so that perl knows that it's a function, and not a variable or filehandle, or something else.

      Update: see further down in the thread. Still need to confirm exactly what's going on, but I'll place that in the other node.

        Can you point to some documentation about this?