http://qs321.pair.com?node_id=915702


in reply to Re^4: RFC: SecureString - Obfuscated / masked strings exept when you need them (revised synopsis & tied filehandles)
in thread RFC: SecureString - Obfuscated / masked strings exept when you need them

That's part of why you should write your logs in JSON format! But, yes, excellent point.

I wonder if overload.pm can cause "foo $bar" to return an overload'ed object since it should compile down to "foo " . $bar and you should be able to overload concatenation. If so, then it could return an object that stringifies to "foo XXXXX" somewhere inside of 'print'.

Sorry, I can't take the time to test that at the moment.

- tye        

  • Comment on Re^5: RFC: SecureString - Obfuscated / masked strings exept when you need them (interpolation)
  • Select or Download Code

Replies are listed 'Best First'.
Re^6: RFC: SecureString - Obfuscated / masked strings exept when you need them (interpolation)
by duelafn (Vicar) on Jul 20, 2011 at 18:34 UTC

    Hm. You know, it can in fact do that (overloading both '""' and '.' does what one would want). The new object would need to store the left and right concatenated objects (potentially creating deep trees), but that can also solve the problem where a string is constructed then used twice. Nice!

    Good Day,
        Dean

      potentially creating deep trees

      I think just a flat list of values, at least one of which is a Text::Hidden object, would be sufficient. :)

      - tye