While not explicitly documented, the intention was that calling the Neo4j::Driver constructor with a hash that has no uri entry should result in the uri config option automatically being assigned a defined default value (currently http://localhost:7474). This is not in fact the case in 0.27.
$d = Neo4j::Driver->new({ })->session->server->address
# Expected: localhost:7474
# Actual: dies: config() without options unsupported at Neo4j/Driver.pm line 124.
Neo4j::Driver->new({ cypher_params => v2 })->session->server->address
# Expected: localhost:7474
# Actual: dies: Can't call method "scheme" on an undefined value at Neo4j/Driver/Session.pm line 22.
In contrast, calling the constructor without parameters at all works as intended:
While not explicitly documented, the intention was that calling the Neo4j::Driver constructor with a hash that has no
uri
entry should result in theuri
config option automatically being assigned a defined default value (currentlyhttp://localhost:7474
). This is not in fact the case in 0.27.In contrast, calling the constructor without parameters at all works as intended:
Until this issue is addressed, the workaround is to always include an explicit
uri
entry in the hash ref, even if the value is undefined: