Re: Symrefs
- From: "Petr Vileta" <stoupa@xxxxxxxxxxxxx>
- Date: Wed, 22 Aug 2007 03:37:18 +0200
Uri Guttman wrote:
even though there may be duplication in the sub names and dispatchYes, you are right. But my reason to use sub names in DB is very simple. I see I must to view the true :-)
table entry keys, i agree that having the DB hold those names is a
bad idea. i know reasons why you do that such as a personal list of
plugins to load, etc. but those names could be different than the
actual sub names or even map 1 to many (or many to 1) so a dispatch
table (even manually created) is safer as the coder controls what is
allowed to be
called. using the symbol table to check for sub existance is bad
because of the possibility of calling code not under your control. as
brian said, that is nasty regardless of dispatch tables but it is
just safer IMO. i would consider the names in the DB as data that
request operations to be called rather than explicit sub names to be
called by symrefs.
I write web application for collecting weather data for as many locations as possible. In internet are many servers with weather data. Some personal, some business, some government. On some servers you can collect data about tens or hundred towns, on some servers you can get data about one location only. Of course, every server generate different html code which I must to parse for get data.
A limited number of people in world have access to my database and can to add new link to weather page. The "link" field in database have own unique index and cannot be inserted twice. So as you can see for some pages the links are similar, say
http://www.france-weather.fr?town=Paris
http://www.france-weather.fr?town=Caen
and I can use the same sub to parse html code. Other links are very different and I must use very different subs. I don't know how many locations/links I will have in DB next year or in 5 years ;-) And I don't know too, how many subs I will have. Maybe links will be 5000 and subs 100, maybe links will be 5000 and subs 4000.
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail from another non-spammer site please.)
.
- Follow-Ups:
- Re: Symrefs
- From: Uri Guttman
- Re: Symrefs
- From: Jürgen Exner
- Re: Symrefs
- References:
- how to call sub by value in variable
- From: Petr Vileta
- Re: how to call sub by value in variable
- From: xhoster
- Re: how to call sub by value in variable
- From: Petr Vileta
- Re: how to call sub by value in variable
- From: xhoster
- Re: how to call sub by value in variable
- From: Brian McCauley
- Symrefs (was: how to call sub by value in variable)
- From: Gunnar Hjalmarsson
- Re: Symrefs
- From: Uri Guttman
- Re: Symrefs
- From: Brian McCauley
- Re: Symrefs
- From: Jürgen Exner
- Re: Symrefs
- From: Uri Guttman
- how to call sub by value in variable
- Prev by Date: Re: Symrefs
- Next by Date: Re: several sockets in the same process
- Previous by thread: Re: Symrefs
- Next by thread: Re: Symrefs
- Index(es):
Relevant Pages
|