in reply to Re: mod_perl: globals and security question
in thread mod_perl: globals and security question

There aren't many, but one of them is to temporarily assign a value to a global. That's what the OP wants, so it's not strange at all. One of the reasons it's not used much anymore is because the use of globals is discouraged. That doesn't mean there are times where the advantages of using globals outweigh the disadvantages. This appears to be one of them.
  • Comment on Re^2: mod_perl: globals and security question

Replies are listed 'Best First'.
Re^3: mod_perl: globals and security question
by perrin (Chancellor) on Oct 12, 2005 at 17:18 UTC
    That's why I was asking if this was in support of legacy code. Most cases where this used to be needed would be handled with lexicals these days, so they are mostly reserved for things like $/. There are other ways to do what the OP is after, and I think they would probably be less confusing to non-expert Perl coders.