Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: OOP in CGI

by wink (Scribe)
on Jul 29, 2005 at 09:20 UTC ( [id://479308]=note: print w/replies, xml ) Need Help??


in reply to Re: OOP in CGI
in thread OOP in CGI

It was not meant to be a working fragment, merely an example of what I was talking about. :) I usually use

use CGI qw(:standard);

for my CGI apps (all two of them that I've made so far). I'm not really familiar with what has been called "namespace polution" but I assume it refers to an abundance of crap all in the namespace that can lead to more memory usage, longer access times, more processor usage, etc.

Replies are listed 'Best First'.
Re^3: OOP in CGI
by davorg (Chancellor) on Jul 29, 2005 at 09:29 UTC

    "Namespace pollution" is where you end up having more symbols in your symbol table than the ones that you put there yourself. It can make things a bit confusing and the chances of having two symbols with the same name is increased. For example, if you have both use CGI ':standard' and use LWP::Simple in your program (which is a pretty common thing to want to do) then both of these modules try to export a subroutine called "head" into your symbol table. This will potentially lead to the universe exploding.

    --
    <http://www.dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-26 00:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found