Skip to content

Commit 6f69701

Browse files
committed
Fix deprecated API: eval_dies_ok and isa_ok
1 parent 39908b7 commit 6f69701

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

t/pod-convenience.t

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ plan 10;
77

88
subtest {
99
plan 4;
10-
eval_dies_ok('use Pod::Convenience; first-code-block();', "pod argument required");
11-
eval_dies_ok('use Pod::Convenience; first-code-block("moo");', "array argument required");
10+
eval-dies-ok('use Pod::Convenience; first-code-block();', "pod argument required");
11+
eval-dies-ok('use Pod::Convenience; first-code-block("moo");', "array argument required");
1212

1313
is(first-code-block(["text"]), '', "non-code POD returns empty string");
1414

@@ -22,9 +22,9 @@ subtest {
2222

2323
subtest {
2424
plan 7;
25-
eval_dies_ok('use Pod::Convenience; pod-with-title();', "title argument required");
25+
eval-dies-ok('use Pod::Convenience; pod-with-title();', "title argument required");
2626
my $pod = pod-with-title("title text");
27-
isa_ok($pod, Pod::Block::Named);
27+
isa-ok($pod, Pod::Block::Named);
2828
is($pod.name, "pod", "block name correct");
2929
# XXX: why do we have to dig so far to get to the title here?
3030
is($pod.contents[0].contents[0].contents[0], "title text", "title matches input");
@@ -44,23 +44,23 @@ subtest {
4444
my $title = "Pod document title";
4545
my $pod = pod-title($title);
4646

47-
isa_ok($pod, Pod::Block::Named);
48-
eval_dies_ok('use Pod::Convenience; pod-title()', "title argument required");
47+
isa-ok($pod, Pod::Block::Named);
48+
eval-dies-ok('use Pod::Convenience; pod-title()', "title argument required");
4949

5050
$pod = pod-title('');
5151
ok($pod, "empty title is ok");
5252

5353
$pod = pod-title($title);
5454
is($pod.name, "TITLE", "is a title element");
5555

56-
isa_ok($pod.contents, Array);
56+
isa-ok($pod.contents, Array);
5757
is($pod.contents[0].contents, $title, "title contents set correctly");
5858
}, "pod-title";
5959

6060
subtest {
6161
plan 5;
6262
my $pod = pod-block('');
63-
isa_ok($pod, Pod::Block::Para);
63+
isa-ok($pod, Pod::Block::Para);
6464
ok(pod-block(), "empty argument ok");
6565

6666
$pod = pod-block("hello");
@@ -75,11 +75,11 @@ subtest {
7575

7676
subtest {
7777
plan 6;
78-
eval_dies_ok('use Pod::Conenience; pod-link()', "text argument required");
79-
eval_dies_ok('use Pod::Conenience; pod-link("text")', "link argument required");
78+
eval-dies-ok('use Pod::Conenience; pod-link()', "text argument required");
79+
eval-dies-ok('use Pod::Conenience; pod-link("text")', "link argument required");
8080

8181
my $pod = pod-link("text", "link");
82-
isa_ok($pod, Pod::FormattingCode);
82+
isa-ok($pod, Pod::FormattingCode);
8383

8484
is($pod.type, "L", "is a link type");
8585
is($pod.contents[0], "text", "text matches input");
@@ -88,10 +88,10 @@ subtest {
8888

8989
subtest {
9090
plan 4;
91-
eval_dies_ok('use Pod::Convenience; pod-bold()', "text argument required");
91+
eval-dies-ok('use Pod::Convenience; pod-bold()', "text argument required");
9292

9393
my $pod = pod-bold("text");
94-
isa_ok($pod, Pod::FormattingCode);
94+
isa-ok($pod, Pod::FormattingCode);
9595

9696
is($pod.type, "B", "is a bold type");
9797
is($pod.contents[0], "text", "text matches input");
@@ -103,7 +103,7 @@ subtest {
103103
ok(pod-item(''), "empty string argument ok");
104104

105105
my $pod = pod-item(qw{hello there});
106-
isa_ok($pod, Pod::Item);
106+
isa-ok($pod, Pod::Item);
107107
is($pod.level, 1, "default level correct");
108108
is($pod.contents, "hello there", "contents matches input");
109109

@@ -113,10 +113,10 @@ subtest {
113113

114114
subtest {
115115
plan 6;
116-
eval_dies_ok('use Pod::Convenience; pod-heading()', "name argument required");
116+
eval-dies-ok('use Pod::Convenience; pod-heading()', "name argument required");
117117

118118
my $pod = pod-heading("name");
119-
isa_ok($pod, Pod::Heading);
119+
isa-ok($pod, Pod::Heading);
120120
is($pod.contents[0].contents, "name", "heading name matches input");
121121
is($pod.level, 1, "level matches default value");
122122

@@ -127,23 +127,23 @@ subtest {
127127

128128
subtest {
129129
plan 4;
130-
eval_dies_ok('use Pod::Convenience; pod-table();', "contents argument required");
131-
eval_dies_ok('use Pod::Convenience; pod-table("");', "fails with empty string argument");
130+
eval-dies-ok('use Pod::Convenience; pod-table();', "contents argument required");
131+
eval-dies-ok('use Pod::Convenience; pod-table("");', "fails with empty string argument");
132132

133133
my $pod = pod-table(qw{table data});
134-
isa_ok($pod, Pod::Block::Table);
134+
isa-ok($pod, Pod::Block::Table);
135135
is($pod.contents, "table data", "table data matches input");
136136
}, "pod-table";
137137

138138
subtest {
139-
eval_dies_ok('use Pod::Convenience; pod-lower-headings();', "content argument required");
139+
eval-dies-ok('use Pod::Convenience; pod-lower-headings();', "content argument required");
140140

141141
# should probably die, currently throws an internal error
142-
#eval_dies_ok('use Pod::Convenience; pod-lower-headings(qw{foo bar});',
142+
#eval-dies-ok('use Pod::Convenience; pod-lower-headings(qw{foo bar});',
143143
#"plain content array not acceptable");
144144

145145
my $lowered-pod = pod-lower-headings([pod-heading("A head 1 heading")]);
146-
isa_ok($lowered-pod, Array);
146+
isa-ok($lowered-pod, Array);
147147
is($lowered-pod[0].level, 1, "single POD heading lowered from 1 to 1");
148148
is($lowered-pod[0].contents[0].contents, "A head 1 heading", "lowered heading contents match input");
149149

t/pod-htmlify.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use Pod::Htmlify;
1919
subtest {
2020
plan 7;
2121

22-
eval_dies_ok('use Pod::Htmlify; url-munge();', "requires an argument");
22+
eval-dies-ok('use Pod::Htmlify; url-munge();', "requires an argument");
2323
is(url-munge("http://www.example.com"), "http://www.example.com",
2424
"plain url string with explicit protocol");
2525
is(url-munge("Class::Something"), "/type/Class%3A%3ASomething",

0 commit comments

Comments
 (0)