# Tests that;
#
+use strict;
use Test::More;
use Test::Exception;
use strict;
use Data::Dumper;
-our %opt;
+my %opt;
BEGIN { map { $opt{$_}=1 if s/^-// } @ARGV; }
use constant DEBUG => (exists $opt{d} ? 1 : 0);
local $SIG{__WARN__} = sub { diag "[warn] ", @_; };
# Usefull test subs for the schema objs
#=============================================================================
-our %ATTRIBUTES;
+my %ATTRIBUTES;
$ATTRIBUTES{field} = [qw/
name
data_type
sub do_file {
my $testschema = shift;
# Parse the test XML schema
- our $obj;
+ my $obj;
$obj = SQL::Translator->new(
debug => DEBUG,
show_warnings => 1,
);
die "Can't find test schema $testschema" unless -e $testschema;
my $sql = $obj->translate(
- from => "SqlfXML",
- to =>"MySQL",
+ from => 'XML-SQLFairy',
+ to => 'MySQL',
filename => $testschema,
);
print $sql if DEBUG;
use Test::Exception;
use Data::Dumper;
-our %opt;
+my %opt;
BEGIN { map { $opt{$_}=1 if s/^-// } @ARGV; }
use constant DEBUG => (exists $opt{d} ? 1 : 0);
use constant TRACE => (exists $opt{t} ? 1 : 0);
# show_warnings => 1,
# add_drop_table => 1,
# from => "MySQL",
-# to => "SqlfXML",
+# to => "XML-SQLFairy",
# producer_args => { attrib_values => 1 },
# );
# print $obj->translate($file);
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'
+use strict;
use Test::More;
use Test::Exception;
use Data::Dumper;
-BEGIN { our %opt; map { $opt{$_}=1 if s/^-// } @ARGV; }
+use vars '%opt';
+BEGIN { map { $opt{$_}=1 if s/^-// } @ARGV; }
use constant DEBUG => (exists $opt{d} ? 1 : 0);
local $SIG{__WARN__} = sub { diag "[warn] ", @_; };
use SQL::Translator::Producer::TTSchema;
# Parse the test XML schema
-our $obj;
+my $obj;
$obj = SQL::Translator->new(
debug => DEBUG, #$opt{d},
show_warnings => 1,
add_drop_table => 1,
- from => "SqlfXML",
+ from => "XML-SQLFairy",
filename => "$Bin/data/xml/schema-basic.xml",
to => "TTSchema",
producer_args => {