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

You have to import that constant (which is really a subroutine) in your script before you call it.
  • Comment on Re: Bareword "Apache2::Const::REDIRECT" not allowed while "strict subs" in use

Replies are listed 'Best First'.
Re^2: Bareword "Apache2::Const::REDIRECT" not allowed while "strict subs" in use
by thcsoft (Monk) on May 04, 2005 at 04:59 UTC
    hmm... well, thank you for your replies. i've tried both ways meanwhile, explicitly using
    use Apache2::Const -compile => qw/:common :http/; ... return Apache2::Const::REDIRECT();
    but all that i get is a runtime error:
    Undefined subroutine &Apache2::Const::REDIRECT called
    so i think i'll be better off calling an internal redirect instead - although that behaviour still smells to me like a bug in ModPerl::Registry ...

    thank you again.
    language is a virus from outer space.
      If it's a bug, it's a bug in Apache2::Const. My previous advice about importing was wrong -- what you did should work with the () on the end. Maybe REDIRECT is documented in the wrong group. Can you try listing it explicitly in your compile list, or compiling some different groups?