Re: Getting a / when regex should produce nothing
André Warnier <[email protected]>
| Newsgroups | gmane.comp.apache.mod-perl |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: ... > But you left out one important caveat which could scare away > more potential users than it saves. > > The retention of values from previous executions applies > only to global variables. Ah, yes. But that would have triggered another discussion (which it might now still do of course), about what exactly /is/ a global variable, in the context of a mod_perl handler or perl script run under modperl::Registry. I must admit that I am not totally clear on that subject either. I understand the basic idea of scoping, but as to the fine distinctions between "our" and "my" variables defined/referenced within/without various functions defined in the same package, and what mod_perl makes of this package when it compiles it, I tend to get a bit confused. And I would not be surprised if the perl documentation to that effect confused a relative beginner even more. So again, to be defensive I find that the safest (if not most efficient/elegant) way is to just treat every variable as a potential problem, and make sure they are (re-)initialised unless I specifically don't want them to be. This is no critic to the writers of the perl and mod_perl documentation. I am sure that this particular topic is quite hard to get across clearly and succintly to perl plodders such as me. And I find the perl documentation, in general, extremely accessible and a treasure-trove of information (and not just about perl). It's just that on that particular topic I seem to be a bit thick, and considering that, I'd rather be safe than sorry.