Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^5: RFC: SecureString - Obfuscated / masked strings exept when you need them (interpolation)

by tye (Sage)
on Jul 20, 2011 at 18:16 UTC ( [id://915702]=note: print w/replies, xml ) Need Help??


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 (Parson) 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        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://915702]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (None)
    As of 2024-04-18 23:42 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found