plan skip_all => 'Set $ENV{DBICTEST_MSSQL_ADO_DSN}, _USER and _PASS to run this test'
unless ($dsn && $user);
+require DBICTest::Schema;
DBICTest::Schema->load_classes(qw/VaryingMAX ArtistGUID/);
my %binstr = ( 'small' => join('', map { chr($_) } ( 1 .. 127 )) );
my $rs = $schema->resultset('VaryingMAX');
foreach my $size (qw/small large/) {
- my $orig_debug = $schema->storage->debug;
-
- $schema->storage->debug(0) if $size eq 'large';
+ local $schema->storage->{debug} = 0 if $size eq 'large';
my $str = $binstr{$size};
my $row;
cmp_ok try { $row->varchar_max }, 'eq', $str, 'VARCHAR(MAX) matches';
cmp_ok try { $row->nvarchar_max }, 'eq', $str, 'NVARCHAR(MAX) matches';
cmp_ok try { $row->varbinary_max }, 'eq', $str, 'VARBINARY(MAX) matches';
-
- $schema->storage->debug($orig_debug);
}
# test regular blobs