Hopefully you can read C without understanding it ;) All it does is having a counter which tracks where it is inside the hash entry's list. so when you call FETCH it uses that index to get the right > value.
Managed to do it without reading it. :-) I also did some experimentation and made a few other changes to make it behave more like Apache::Table does. I've now uploaded Apache::FakeTable 0.02 to CPAN. Here are the changes:
0.02 Thu Sep 4 05:32:22 2003
- Fixed behavior of each to match that of Apache::Table. It will
now return multiple key/value pairs for a single key that has
multiple values.
- Changed behavior of new() to require an Apache object as its
first object to bring it more in line with the behavior of
Apache::Table::new.
- Assigning a value of undef no longer deletes the key from the
table, but goes ahead and assigns it. When warnings are enabled,
this will cause Apache::FakeTable to issue a "Use of
uninitialized value in null operation" warning.
- The merge() method will now only merge the new value with the
first value when a key has multiple existing values. It also now
uses a comma and a space to separate the values, instead of just
a comma.
At this point, I think it's pretty damn close. Bug reports welcome. If folks decide that they'd like to use a different namespace for the fake/emulate modules, I'll be happy to relocate this module.
Cheers,
David
-- David Wheeler AIM: dwTheory [EMAIL PROTECTED] ICQ: 15726394 http://www.kineticode.com/ Yahoo!: dew7e Jabber: [EMAIL PROTECTED] Kineticode. Setting knowledge in motion.[sm]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
