Skip to content

Commit

Permalink
Bail out if we don't have the API key in %ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Maischein committed May 21, 2017
1 parent 39fb2d5 commit 30bbcf4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions t/www-shadertoy-02-basic.t
Expand Up @@ -4,8 +4,10 @@ use Test::More tests => 6;
use WWW::ShaderToy;
use Data::Dumper;

skip BAIL_OUT, ""
unless $ENV{SHADERTOY_API_KEY};
if( !$ENV{SHADERTOY_API_KEY} ) {
diag "No Shadertoy.org API key found in \%ENV";
skip BAIL_OUT;
};

my $api = WWW::ShaderToy->new(
api_key => $ENV{SHADERTOY_API_KEY},
Expand Down

0 comments on commit 30bbcf4

Please sign in to comment.