MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: Ambiguous use of index



******    message to minivend-users from mikeh@minivend.com     ******

Quoting Erik Aase-Remedios (erik@fourfish.com):
> ******    message to minivend-users from Erik Aase-Remedios <erik@fourfish.com>     ******
> 
> This isn't really an issue.  It means what it says and it says what it
> means ;-)=.
> 
> The line "Ambiguous use of index => resolved to "index" => at
> .../mvend/lib/Vend/Parse.pm line 145." means that on line 145 of Parse.pm
> there is the word 'index'.  This word is being used in such a way that the
> perl interpreter is guessing that it's a string "index" and not a call to
> the function 'index'.  It's warning you of this since it might be guessing
> wrong.  While I haven't looked at Vend::Parse to see what's really there,
> I'm guessing that perl is guessing correctly, it usually does.
> 
> To get rid of it you can edit the file and make it un-ambiguous by putting
> quotes around the word "index" if you really are bothered by it. 
> 

Actually, this is a bug in Perl 5.004 which is resolved in 5.005.
The => operator is supposed to force string status for the left-hand
side, and it didn't in all situations. I am not clear why this happens;
mostly it is Perl reserved words, but "salestax" caused problems as
well and that is certainly not a reserved word.

Since I don't use 5.004 any more on any system I take care of I
don't notice this. It is harmless, except that I believe that too many
error messages cause you to ignore important ones.

Obviously I added the "index" tag after beta13. 8-)

I didn't have time to document it; basically what it does is provide
an index for a database with indexing arguments that are like the one-click
search. 

	[index table=products file=products.idx
			arg="
					rf=artist,code
					tf=artist,title
					ra=yes
					fi=products.asc
				"]

It only does the indexing if the ASCII source file is newer than the index
file, and it will export a GDBM or DB_File database to obtain a current
ASCII file if necessary.

This allows some pretty flexible binary searching.

-- 
Mike Heins                          http://www.minivend.com/  ___ 
                                    Internet Robotics        |_ _|____
Fast, reliable, cheap.              131 Willow Lane, Floor 2  | ||  _ \
Pick two and we'll talk.            Oxford, OH  45056         | || |_) |
 -- unknown                         <mikeh@minivend.com>     |___|  _ <
                                    513.523.7621 FAX 7501        |_| \_\
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: