| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
2
|
|
|
2
|
|
4675
|
use v5.20; |
|
|
2
|
|
|
|
|
26
|
|
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Tie::String::Redactable; |
|
4
|
2
|
|
|
2
|
|
612
|
use experimental qw(signatures); |
|
|
2
|
|
|
|
|
2042
|
|
|
|
2
|
|
|
|
|
15
|
|
|
5
|
2
|
|
|
2
|
|
388
|
use parent qw(String::Redactable); |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
20
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.087'; |
|
8
|
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
5797
|
sub TIESCALAR ($class, $string) { |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
2
|
|
|
10
|
1
|
|
|
0
|
|
10
|
local $SIG{__WARN__} = sub {}; |
|
11
|
1
|
|
|
|
|
5
|
my $self = bless String::Redactable->new($string), __PACKAGE__; |
|
12
|
|
|
|
|
|
|
} |
|
13
|
|
|
|
|
|
|
|
|
14
|
3
|
|
|
3
|
|
23802
|
sub FETCH ($self) { |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
3
|
|
|
15
|
3
|
|
|
|
|
10
|
$self->placeholder; |
|
16
|
|
|
|
|
|
|
} |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub STORE { |
|
19
|
0
|
|
|
0
|
|
|
return; |
|
20
|
|
|
|
|
|
|
} |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=encoding utf8 |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 NAME |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Tie::String::Redactable - work even harder to redact a string |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
use Tie::String::Redactable; |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
my $object = tie my $string, 'Tie::String::Redactable', $secret; |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
$object->to_str_unsafe; |
|
35
|
|
|
|
|
|
|
(tied $string)->to_str_unsafe; |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
This is a tied version of L that refuses to store |
|
40
|
|
|
|
|
|
|
a new value, and you have to go through the tied object to get to the |
|
41
|
|
|
|
|
|
|
object that allows you to call the method you need. It's unlikely that |
|
42
|
|
|
|
|
|
|
you would inadvertently type out any of that. |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 TO DO |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 SOURCE AVAILABILITY |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
This source is on GitHub: |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
http://github.com/briandfoy/string-redactable |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 AUTHOR |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
brian d foy, C<< >> |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Copyright © 2025-2026, brian d foy, All Rights Reserved. |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
You may redistribute this under the terms of the Artistic License 2.0. |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
__PACKAGE__; |