Re: Is it me or is mod_perl extremely dangerous?

[email protected] (Randal L. Schwartz)
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
>>>>> "Tuomo" == Tuomo Salo <[email protected]> writes:

Tuomo> When you use a "my" variable outside a subroutine, you create a variable
Tuomo> that is completely invisible from anywhere outside of that file. This 
Tuomo> violates some core principles of object oriented programming, and perl
Tuomo> itself:

No it doesn't.  It's common practice.  It may not be the way *you* code
in Perl, but it's perfectly acceptable Perl to have a file-lexical
variable.  Ever heard of "inside-out objects"?  That's precisely the
mechanism by which this was accomplished.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[email protected]> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.