Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.

Commit

Permalink
Explicitly load re::regexp_pattern for 5.10.0
Browse files Browse the repository at this point in the history
Before then, it wasn't available; afterwards it was always available.
  • Loading branch information
xdg committed Apr 15, 2014
1 parent 36bb62d commit 72fff19
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/MongoDB.pm
Expand Up @@ -40,6 +40,12 @@ XSLoader::load(__PACKAGE__, $MongoDB::VERSION);

*read_documents = \&MongoDB::BSON::decode_bson;

# regexp_pattern was unavailable before 5.10, had to be exported to load the
# function implementation on 5.10, and was automatically available in 5.10.1
if ( $] eq '5.010' ) {
use re qw/regexp_pattern/;
}

1;


Expand Down

0 comments on commit 72fff19

Please sign in to comment.