> But you can't say $sw = SWISH::API->new( "index.1 index.2" ). That
> breaks existing code.
That's true. I was aiming mostly for proof-of-concept; not a final
solution :). But I'm thinking...if you try to support "legacy" code, how
do you differentiate between:
(a) SWISH::API->new("/Users/lars/Documents/Office Files/index.1")
And:
(b) SWISH::API->new("/Users/lars/index.1 /Users/lars/index.2")
?
I guess you could have new(), instead of accepting a list of index files,
accept either (a) a scalar containing a space-seperated list, or (b) a list
reference:
SWISH::API->new(["/path/to/index.1", "/path/to/index.2"]);
This would let you differentiate between "legacy" code and "new style"
code. It's a fairly transparent solution.
-- Lars
--
Lars Kellogg-Stedman <lars@oddbit.com>
Received on Tue Nov 30 17:38:27 2004