oliwer / mango

Pure-Perl non-blocking I/O MongoDB driver
https://metacpan.org/release/Mango
Artistic License 2.0
27 stars 12 forks source link

Disable unicode_strings when working with regular expressions #37

Open ppisar opened 4 years ago

ppisar commented 4 years ago

Mojo::Base 0.50 enables unicode_strings feature in the scope where it used from. As a result, deserializing a regular expression injects qr//u flag to regexp object although the was no such flags in the deserialized BSON. The same issue repeats in t/bson.t when shuffling with the regular expressions.

The consequence is that a t/bson.t test fails.

This patch fixes it with disabling unicode_strings feature where needed.

https://github.com/oliwer/mango/issues/36