grondilu / libbitcoin-perl

bitcoin perl library
19 stars 12 forks source link

BITCOIN_MAGIC (enabled by default) breaks string escaping #4

Open jes opened 8 years ago

jes commented 8 years ago

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 commented 8 years ago

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.