pasky/speedread

brew install speedrun fails with bad pragma

sukima opened this issue · 3 comments

When installed on MacOS Mojave 10.14.6 I get this:

The encoding pragma is no longer supported. Check cperl at /usr/local/bin/speedread line 39.
BEGIN failed--compilation aborted at /usr/local/bin/speedread line 39.

Installed via homebrew using https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/speedread.rb

I have exactly the same error on MacOS Catalina 10.15.7. Also installed through homebrew.

same issue when installed via antidote:

❯ antidote install matthewfranglen/speedread
# antidote cloning matthewfranglen/speedread...
Adding bundle to '/home/bbaker/.zsh_plugins.txt':
matthewfranglen/speedread
❯ antidote load
❯ speedread --version
The encoding pragma is no longer supported. Check cperl at /home/bbaker/.cache/antidote/https-COLON--SLASH--SLASH-github.com-SLASH-matthewfranglen-SLASH-speedread/speedread line 39.
BEGIN failed--compilation aborted at /home/bbaker/.cache/antidote/https-COLON--SLASH--SLASH-github.com-SLASH-matthewfranglen-SLASH-speedread/speedread line 39.

same issue when installed via antidote:

❯ antidote install matthewfranglen/speedread
# antidote cloning matthewfranglen/speedread...
Adding bundle to '/home/bbaker/.zsh_plugins.txt':
matthewfranglen/speedread
❯ antidote load
❯ speedread --version
The encoding pragma is no longer supported. Check cperl at /home/bbaker/.cache/antidote/https-COLON--SLASH--SLASH-github.com-SLASH-matthewfranglen-SLASH-speedread/speedread line 39.
BEGIN failed--compilation aborted at /home/bbaker/.cache/antidote/https-COLON--SLASH--SLASH-github.com-SLASH-matthewfranglen-SLASH-speedread/speedread line 39.

fixed with:

diff --git a/speedread b/speedread
index 2e48658..1fcaad4 100755
--- a/speedread
+++ b/speedread
@@ -36,8 +36,6 @@ my $multiword = 0;
 use utf8;
-use encoding 'utf8';
-use encoding::warnings;
 binmode(STDIN, ":encoding(UTF-8)");
 binmode(STDOUT, ":encoding(UTF-8)");