Can't modify single ref constructor in scalar assignment at -e line 4, near "qq{our \$VERSION = '$newver';\n};"
devurandom opened this issue · 6 comments
When I try to build the script, I get following error:
$ make
./repo-generate version > versionfile
./repo-generate date > datefile
perl -MFile::Slurp -p < sieve-connect.pre.pl > sieve-connect.pl -e ' \
BEGIN { $newver = read_file("versionfile"); chomp $newver; }; \
next unless /VERSION.*MAGIC LINE REPLACED IN DISTRIBUTION/; \
$_ = qq{our \$VERSION = '"'"'$newver'"'"';\n}; \
'
Can't modify single ref constructor in scalar assignment at -e line 4, near "qq{our \$VERSION = '$newver';\n};"
syntax error at -e line 5, at EOF
Execution of -e aborted due to compilation errors.
make: *** [sieve-connect.pl] Error 255
I am using Ubuntu 14.04. Perl is at version 5.18.2-2ubuntu1 and File::Slurp is at version 9999.19-4.
Reproduced in that environment.
This affects v0.87 as well, so it is not a regression from the last release.
Yeah, this is a maintainer build rule, doesn't affect people using release tarballs.
I prep the releases on a box which is currently perl 5.20 File::Slurp 9999.19 on FreeBSD 10.1.
Some kind of whitespace parsing issue; the \
at the end of the line with the regexp on it is combining with the $_
on the next line, I think, to produce \$_
...
Time to move this out of a makefile and into the repo-generate utility, to avoid stupid shell whitespace parsing portability issues.
I believe that this should now be resolved; please re-open the ticket if it fails for you still.
Tested on Ubuntu 14.04.2 and FreeBSD 10.1.
I suspect that the actual problem was a bsdmake vs gmake issue around backslashes and don't fancy developing a headache chasing it further, so I avoided the problem by making each moving part a little simpler.
Thanks for reporting the issue, so that it could be fixed! :)
Thanks for fixing it!