Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 ( #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 (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        

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://915702]
help
Chatterbox?
What's the matter? Cat got your tongue?...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2017-12-17 02:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (462 votes). Check out past polls.

    Notices?