Skip to content

Commit d3d19e4

Browse files
committed
Merge pull request #13 from rurban/master
perl5.21 warns about Redundant argument in sprintf PR#13
2 parents ed02e63 + ddb06b6 commit d3d19e4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/DBI/Profile.pm

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,12 @@ sub as_text {
831831
for (@path) {
832832
s/[\r\n]+/ /g;
833833
s/$separator_re/ /g;
834-
$_ = sprintf $format_path_element, $_, ++$idx;
834+
if ($format_path_element eq "%s") {
835+
$_ = sprintf $format_path_element, $_;
836+
++$idx;
837+
} else {
838+
$_ = sprintf $format_path_element, $_, ++$idx;
839+
}
835840
}
836841
push @text, sprintf $format,
837842
join($separator, @path), # 1=path

0 commit comments

Comments
 (0)