On Thu, 2003-12-18 at 05:59, A. Pagaltzis wrote:
> I'd prefer if it didn't (ab)use the "minus on literal string".
> There's nothing ambiguous in the syntax that might require it.

I disagree, since the tie call could include -inflate_key and
-deflate_value. It is also legal to say:

tie %hash, 'Tie::HashWrapper', \%wrapped,
        sub { ... }, # -inflate_key
        sub { ... }, # -deflate_key
        sub { ... }, # -inflate_value
        sub { ... }; # -deflate_value

This is all using my own Getargs::Mixed module.

> Sounds like what you're proposing is a special case of a
> simplified interface to tieing in general. You're making life
> easier for dealing with tied hashes by only having to deal with
> the values. But it isn't necessary for the approach to be
> specific to hashes.  With appropriate pass-through from of
> parameters from FETCH and STORE, it would apply to any kind of
> tie.
> 
> So I propose Tie::Simple as a collective namespace for generic
> modules that offer a simplified interface to tieing and
> Tie::Simple::Hash for this one.

I like this idea. When I was writing this I had thought that it might be
useful to have such a module for arrays, scalars, and handles. However,
I think Tie::Filter might be a better namespace.

> 
> A reason for this proposal is that I wouldn't use this module to
> roll my own, like you're attempting; contrary to your sentiment,
> I'd use MLDBM. I've used it before, and while it's a big wheel,
> it also affords me the comfort of being able to change to a
> different data structure, particularly to a more complex one,
> instantly, should my needs ever expand. But there's need, IMO,
> for a module that makes quick one-off uses of the tie mechanism
> simpler than the cumbersome logistics required by vanilla Perl.
> 
> So that's what I believe would be a good goal to aim for.

Regards,
Sterling

-- 
<>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><> <>< ><>
  Andrew Sterling Hanenkamp
  http://Andrew.Sterling.Hanenkamp.com/
  [EMAIL PROTECTED] / [EMAIL PROTECTED]

  Keep me informed on the behaviour of this kernel..  As the
  "BugFree(tm)" series didn't turn out too well, I'm starting a new
  series called the "ItWorksForMe(tm)" series, of which this new 
  kernel is yet another shining example.
                       -- Linus, in the announcement for 1.3.29
        

Reply via email to