libbitcoin-perl icon indicating copy to clipboard operation
libbitcoin-perl copied to clipboard

BITCOIN_MAGIC (enabled by default) breaks string escaping

Open jes opened this issue 9 years ago • 1 comments

The code that is supposed to magically generate Bitcoin::Key and Bitcoin::Address objects from strings breaks quoting. Example:

use strict;
use warnings;

use Bitcoin;

print "hello world\n";

Output is "hello world\n" with "\n" printed as literal characters. The problem is fixed when Bitcoin is loaded with qw(:nomagic).

This is a pretty damning error, magic mode should be disabled by default if it causes this problem.

jes avatar Aug 28 '16 10:08 jes

That should fix it without having to disable magic mode by default, however I personally disagree with the "spooky action at a distance" created by the magic mode, and would be in favour of disabling it by default, or even better removing it entirely.

jes avatar Aug 28 '16 10:08 jes