Skip to content

Commit 2f016f3

Browse files
colinnewelloalders
authored andcommitted
Use alternative single quote style
1 parent 5f23957 commit 2f016f3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/HTTP/Cookies.pm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -621,42 +621,42 @@ sub _normalize_path # so that plain string compare can be used
621621
# be in quotes which can also have escaping.
622622
sub _split_text {
623623
my $val = shift;
624-
my @vals = grep { $_ ne '' } split(/([;\\"])/, $val);
624+
my @vals = grep { $_ ne q{} } split(/([;\\"])/, $val);
625625
my @chunks;
626626
# divide it up into chunks to be processed.
627627
my $in_string = 0;
628628
my @current_string;
629629
for(my $i = 0; $i < @vals; $i++) {
630630
my $chunk = $vals[$i];
631631
if($in_string) {
632-
if($chunk eq '\\') {
632+
if($chunk eq q{\\}) {
633633
# don't care about next char probably.
634634
# having said that, probably need to be appending to the chunks
635635
# just dropping this.
636636
$i++;
637637
if($i < @vals) {
638638
push @current_string, $vals[$i];
639639
}
640-
} elsif($chunk eq '"') {
640+
} elsif($chunk eq q{"}) {
641641
$in_string = 0;
642642
}
643643
else {
644644
push @current_string, $chunk;
645645
}
646646
} else {
647-
if($chunk eq '"') {
647+
if($chunk eq q{"}) {
648648
$in_string = 1;
649649
}
650-
elsif($chunk eq ';') {
651-
push @chunks, join('', @current_string);
650+
elsif($chunk eq q{;}) {
651+
push @chunks, join(q{}, @current_string);
652652
@current_string = ();
653653
}
654654
else {
655655
push @current_string, $chunk;
656656
}
657657
}
658658
}
659-
push @chunks, join('', @current_string) if @current_string;
659+
push @chunks, join(q{}, @current_string) if @current_string;
660660
s/^\s+// for @chunks;
661661
return \@chunks;
662662
}

0 commit comments

Comments
 (0)