Skip to content

Commit b481d52

Browse files
committed
Wrap check for URI::Escape in BEGIN block
The "unless try" was a good solution, however the check for URI::Escape needs to happen at compile time, since the later "use" will be checked and thus fail since URI::Escape isn't there. What a better solution is, I don't know, however the test works again now.
1 parent 06ada66 commit b481d52

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

t/pod-htmlify.t

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ use v6;
22
use Test;
33
use lib 'lib';
44

5-
unless (try require URI::Escape) {
6-
warn "URI::Escape required to run these tests";
7-
plan 0;
8-
exit;
5+
BEGIN {
6+
unless (try require URI::Escape) {
7+
warn "URI::Escape required to run these tests";
8+
plan 0;
9+
exit;
10+
}
911
}
1012

1113
plan 3;

0 commit comments

Comments
 (0)