Browse files

Set ENV DBIC_NO_VERSION_CHECK to a true value to disable ::Versioned …

…warnings

Signed-off-by: Pedro Melo <melo@simplicidade.org>
  • Loading branch information...
1 parent 0a203dc commit 1fe684abaf92bed107967f93eb92fbd45cf7b39b @melo committed Jan 25, 2010
Showing with 6 additions and 1 deletion.
  1. +1 −0 lib/DBICx/Shortcuts.pm
  2. +5 −1 t/05-shortcuts.t
View
1 lib/DBICx/Shortcuts.pm
@@ -11,6 +11,7 @@ sub setup {
eval "require $schema_class";
die if $@;
+ local $ENV{DBIC_NO_VERSION_CHECK} = 1;
my $schema = $schema_class->connect;
SOURCE: for my $source ($schema->sources) {
View
6 t/05-shortcuts.t
@@ -4,6 +4,7 @@ use strict;
use warnings;
use lib 't/tlib';
use Test::More;
+BEGIN { $ENV{DBIC_NO_VERSION_CHECK} = 42 }
use S1;
eval "require SQL::Translator";
@@ -18,4 +19,7 @@ ok(!S1->can('printings'));
is(S1->schema, $schema, 'Second call to schema, same object returned');
-done_testing();
+is($ENV{DBIC_NO_VERSION_CHECK},
+ 42, 'ENV DBIC_NO_VERSION_CHECK is saved in the call to setup');
+
+done_testing();

0 comments on commit 1fe684a

Please sign in to comment.