Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Paul Cochrane committed Feb 28, 2015
1 parent 06ada66 commit b481d52
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions t/pod-htmlify.t
Expand Up @@ -2,10 +2,12 @@ use v6;
use Test;
use lib 'lib';

unless (try require URI::Escape) {
warn "URI::Escape required to run these tests";
plan 0;
exit;
BEGIN {
unless (try require URI::Escape) {
warn "URI::Escape required to run these tests";
plan 0;
exit;
}
}

plan 3;
Expand Down

0 comments on commit b481d52

Please sign in to comment.