Skip to content

Commit 4b531d7

Browse files
Merge pull request #14 from jkeenan/avert-escape-whitespace-warnings-20250912
Work around new warning in perl-5.43.2
2 parents e6e0956 + 06896e5 commit 4b531d7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/Data/Random.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ sub rand_chars {
139139
if ( $options{'set'} eq 'all' ) {
140140
@charset =
141141
( 0 .. 9, 'a' .. 'z', 'A' .. 'Z', '#', ',',
142-
qw(~ ! @ $ % ^ & * ( ) _ + = - { } | : " < > ? / . ' ; ] [ \ `)
142+
qw(~ ! @ $ % ^ & * ( ) _ + = - { } | : " < > ? / . ' ; ] [ `),
143+
"\\",
143144
);
144145
}
145146
elsif ( $options{'set'} eq 'alpha' ) {

t/rand_chars.t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ use vars qw( %charsets );
1313
'A' .. 'Z',
1414
'#',
1515
',',
16-
qw( ~ ! @ $ % ^ & * ( ) _ + = - { } | : " < > ? / . ' ; [ ] \ ` )
16+
qw( ~ ! @ $ % ^ & * ( ) _ + = - { } | : " < > ? / . ' ; [ ] ` ),
17+
"\\",
1718
],
1819
alpha => [ 'a' .. 'z', 'A' .. 'Z' ],
1920
upperalpha => [ 'A' .. 'Z' ],
@@ -23,7 +24,8 @@ use vars qw( %charsets );
2324
misc => [
2425
'#',
2526
',',
26-
qw( ~ ! @ $ % ^ & * ( ) _ + = - { } | : " < > ? / . ' ; [ ] \ ` )
27+
qw( ~ ! @ $ % ^ & * ( ) _ + = - { } | : " < > ? / . ' ; [ ] ` ),
28+
"\\",
2729
],
2830
);
2931

0 commit comments

Comments
 (0)