DBIx-Custom

 view release on metacpan or  search on metacpan

t/common.t  view on Meta::CPAN

use Test::More;
use strict;
use warnings;
use Encode qw/encode_utf8/;
use FindBin;
use Scalar::Util 'isweak';

 $ENV{DBIX_CUSTOM_SUPPRESS_DEPRECATION} = '0.39';

plan skip_all => $ENV{DBIX_CUSTOM_SKIP_MESSAGE} || 'common.t is always skipped'
  unless $ENV{DBIX_CUSTOM_TEST_RUN}
    && eval { DBIx::Custom->connect; 1 };

plan 'no_plan';

# Dot to under score
sub u($) {
  my $value = shift;
  $value =~ s/\./_/g;
  return $value;
}

sub u2($) {
  my $value = shift;
  $value =~ s/\./__/g;
  return $value;
}

sub hy($) {
  my $value = shift;
  $value =~ s/\./-/g;
  return $value;
}

sub colon2 {
  my $value = shift;
  $value =~ s/\./::/g;
  return $value;
}

sub table_only {
  my $value = shift;
  $value =~ s/^.+\.//;
  return $value;
}

# Global variable
my $table1;
my $table2;
my $table2_alias;
my $table3;
my $key1;
my $key2;
my $key3;
my $key4;
my $key5;
my $key6;
my $key7;
my $key8;
my $key9;
my $key10;
my $create_table1;
my $create_table1_2;
my $create_table1_type;
my $create_table1_highperformance;
my $create_table2;
my $create_table2_2;
my $create_table3;
my $create_table_reserved;
my ($q, $p);
my $date_typename;
my $datetime_typename;
my $date_datatype;
my $datetime_datatype;
my $user_table_info;

# Global setting
{
  my $dbi = DBIx::Custom->connect;

  $table1 = $dbi->table1;
  $table2 = $dbi->table2;
  $table2_alias = $dbi->table2_alias;
  $table3 = $dbi->table3;
  $key1 = $dbi->key1;
  $key2 = $dbi->key2;
  $key3 = $dbi->key3;
  $key4 = $dbi->key4;
  $key5 = $dbi->key5;



( run in 1.981 second using v1.01-cache-2.11-cpan-364913b4093 )