Re: script attack



On Fri, 09 Sep 2005 13:09:53 -0600, Eric Schwartz wrote:

> Brian Wakem <no@xxxxxxxxx> writes:
>> 'local our' is common use in mod_perl.
>>
>> http://perl.apache.org/docs/1.0/guide/porting.html#The_First_Mystery
>
> Okay, fair enough; all the mod_perl I've done has been with Mason,
> which hides all that with the MasonAllowGlobals Apache directive.
> Even so, I look at those examples, and think, "You know, if they just
> passed variables around, instead of using globals, they wouldn't need
> 'local our' at all."
>
> But thanks for the correction; if I find myself using mod_perl with
> other templating engines, I will remember that.

I'd have to agree. I've been using mod_perl for several years and
never needed 'local our' because I'm adverse to using globals
for any case that I don't have to use them. And there just
aren't a lot of times you _have_ to use them.

I was also startled by the porting guide's comment about seeing so
many warnings that they couldn't tell which ones were important and
which ones weren't: Warnings are nearly always important. If your
code _normally_ outputs tons of warnings, you have a serious
problem and very likely a number of outright bugs.

If you _must_ to do something that generates warnings, turn them
off in a scoped block so you don't have warnings about something
that is intended and understood behavior. I've found that fixing
warnings has a very close relationship to fixing bugs in general.

--
Benjamin Franz

.



Relevant Pages

  • PyLint results?
    ... W:230:readDiscreteData: Using the global statement ... I know the use of Globals ... W:995:sendStringToSocket: Used builtin function 'map' ... Plus many other warnings about my naming convention or unused variables ...
    (comp.lang.python)
  • Re: PyLint results?
    ... are warnings or what I can do to fix them: ... The id can you get if you enable them in the output via cmdline or config ... Globals should be discouraged, but often they can't be avoided. ... What is wrong with too many local variables? ...
    (comp.lang.python)
  • Re: PyLint results?
    ... I ran the new pylint and my code and I had a few questions on why those ... are warnings or what I can do to fix them: ... I don't use CVS. ... I know the use of Globals ...
    (comp.lang.python)
  • Re: compiler warnings (was: Re: [rfc] a few kern.mk and bsd.sys.mk related changes)
    ... I attempted to get the gcc people to improve this: ... Most of the warnings I see are either due to someone thinking ... pointer or long in a 32 bit int, or due to the compiler needing ... Fixing bugs is always useful. ...
    (freebsd-hackers)