Skip to content

Commit 370397c

Browse files
committed
with --cpanm-versions, do not use double quotes
Foo~"2" is wrong, Foo~2 is correct. If the consumer needs to shell quote, that is up to the consumer.
1 parent 08b56d3 commit 370397c

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

Changes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ Revision history for {{$dist->name}}
22

33
{{$NEXT}}
44
- add "dzil authordeps --cpanm-versions"
5+
- the --cpanm-versions output no longer includes double quotes;
6+
that is: it emits Foo~2 rather than Foo~"2"
57
- drop Archive::Tar::Wrapper, which failed when the path contained
68
non-ASCII; the speed improvement was quite small
79

lib/Dist/Zilla/App/Command/listdeps.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ sub execute {
174174
if ($opt->versions) {
175175
print "$_ = $modules{$_}\n" for @names;
176176
} elsif ($opt->cpanm_versions) {
177-
print qq{$_~"$modules{$_}"\n} for @names;
177+
print "$_~$modules{$_}\n" for @names;
178178
} else {
179179
print "$_\n" for @names;
180180
}

lib/Dist/Zilla/Util/AuthorDeps.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ sub _format_author_deps {
1515
my $formatted = '';
1616
for my $rec (@{ $reqs }) {
1717
my ($mod, $ver) = %$rec;
18-
$formatted .= $cpanm_versions ? qq{$mod~"$ver"\n}
18+
$formatted .= $cpanm_versions ? "$mod~$ver\n"
1919
: $versions ? "$mod = $ver\n"
2020
: "$mod\n";
2121
}

t/commands/listdeps.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ my @default_prereqs = (
5454
for my $how (
5555
[ [ ], sub {$_} ], # normal
5656
[ [ '--versions' ], sub { "$_ = $versions{$_}" } ],
57-
[ [ '--cpanm-versions' ], sub { qq{$_~"$versions{$_}"} } ],
57+
[ [ '--cpanm-versions' ], sub { "$_~$versions{$_}" } ],
5858
) {
5959
my @opt = @{ $how->[0] };
6060
my $map = $how->[1];

0 commit comments

Comments
 (0)