From: Jonathan Yu Date: Sun, 10 Jan 2010 05:04:57 +0000 (-0500) Subject: eval require instead of use X-Git-Tag: 0.24~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5cc94cf58b4c2ad212d5856335016475687353b2;hp=f5f21f1d7a779ab86ca5981ae3e716effd8325ca;p=gitmo%2FMooseX-Storage.git eval require instead of use We need to eval require instead of use to prevent double imports, since loading YAML::Any causes symbols to be exported by default --- diff --git a/t/020_basic_yaml.t b/t/020_basic_yaml.t index a3c0e03..9f60bf9 100644 --- a/t/020_basic_yaml.t +++ b/t/020_basic_yaml.t @@ -8,7 +8,7 @@ use Test::More; BEGIN { eval "use YAML::Any"; plan skip_all => "YAML::Any is required for this test" if $@; - eval "use YAML"; + eval "require YAML"; plan skip_all => "YAML is required for this test" if $@; eval "require Test::Without::Module"; plan skip_all => "Test::Without::Module is required for this test" if $@; diff --git a/t/020_basic_yaml_syck.t b/t/020_basic_yaml_syck.t index 8def928..d94fcd2 100644 --- a/t/020_basic_yaml_syck.t +++ b/t/020_basic_yaml_syck.t @@ -8,7 +8,7 @@ use Test::More; BEGIN { eval "use YAML::Any"; plan skip_all => "YAML::Any is required for this test" if $@; - eval "use YAML::Syck"; + eval "require YAML::Syck"; plan skip_all => "YAML::Syck is required for this test" if $@; eval "require Test::Without::Module"; plan skip_all => "Test::Without::Module is required for this test" if $@; diff --git a/t/020_basic_yaml_xs.t b/t/020_basic_yaml_xs.t index 8650a0e..42d1d07 100644 --- a/t/020_basic_yaml_xs.t +++ b/t/020_basic_yaml_xs.t @@ -8,7 +8,7 @@ use Test::More; BEGIN { eval "use YAML::Any"; plan skip_all => "YAML::Any is required for this test" if $@; - eval "use YAML::XS"; + eval "require YAML::XS"; plan skip_all => "YAML::XS is required for this test" if $@; eval "require Test::Without::Module"; plan skip_all => "Test::Without::Module is required for this test" if $@;