Fix single quotes escaped incorrectly#97
Conversation
| use inc::Module::Install; | ||
|
|
||
| name '$self->{distro}'; | ||
| author $author; |
There was a problem hiding this comment.
I believe the author command of Module::Install only accepts a single string. This would pass it a comma-separated list of strings. https://metacpan.org/pod/Module::Install#author
There was a problem hiding this comment.
My tests are generating a multi author string as single entry in META.yml for some reason. See https://github.com/Perl-Toolchain-Gang/Module-Install/blob/master/t/19_authors.t#L42
There was a problem hiding this comment.
Then I guess it does accept multiple strings, that's fine then (no one should be generating new M::I dists anyway)
There was a problem hiding this comment.
I also noticed that author command must be set before all_from, otherwise it pulls author from lib file and the metafile ends up with duplicated entries.
|
|
||
| my $author = '[' . | ||
| join(',', map { (my $x = $_) =~ s/'/\'/g; "'$x'" } @{$self->{author}}) | ||
| join(',', map { (my $x = $_) =~ s/'/\\'/g; "'$x'" } @{$self->{author}}) |
|
@Grinnz Assigned you to this, hope that's okay. Happy to do the release when resolved. |
7698bfc to
4619166
Compare
If the author string contains a single quote, perl will die with a bareword syntax error when processing the generated Makefile.PL and Build.PL files.
MI_Makefile_PL_guts()joins authors in a single string and duplicates authors in META.yml.I added a test for it, but not sure if it's needed or if I did it right