Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by nerfherder (Monk)
on May 03, 2005 at 07:18 UTC ( [id://453499]=note: print w/replies, xml ) Need Help??


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?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://453499]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2024-04-19 09:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found