Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2a4e335

Browse files
committed
Support PostgresNode->new along with get_new_node in tests
PostgreSQL recently dropped nonstandard way of create PostgesNode object -function get_new_node exported from the PostgresNode module.Now it is recommended to use PostgresNode->new constructor callThis commit supports both ways of node creation - if get_new_node exists,use it, otherwice all constructor directly.
1 parent6f1a27b commit2a4e335

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎t/001_basic.pl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@
1818
my$res_stderr;
1919

2020
# Initialize node
21-
$node = get_new_node('node');
21+
# Older version of PostgresNode.pm use get_new_node function.
22+
# Newer use standard perl object constructor syntax
23+
if (PostgresNode->can('get_new_node')) {
24+
$node = get_new_node('node');
25+
}else {
26+
$node = PostgresNode->new("node");
27+
}
2228
$node->init;
2329
$node->start;
2430

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp