requires => {
'Digest::SHA' => '0',
'Carp::Clan' => '0',
- 'IO::Scalar' => '2.110',
'Parse::RecDescent' => '1.967009',
'DBI' => '0',
'File::ShareDir' => '1.0',
use base qw(Exporter);
@EXPORT_OK = qw(produce);
-use IO::Scalar;
use SQL::Translator::Utils qw(header_comment debug);
BEGIN {
# Will someone fix XML::Writer already?
$PArgs = $translator->producer_args;
my $newlines = defined $PArgs->{newlines} ? $PArgs->{newlines} : 1;
my $indent = defined $PArgs->{indent} ? $PArgs->{indent} : 2;
- my $io = IO::Scalar->new;
# Setup the XML::Writer and set the namespace
+ my $io;
my $prefix = "";
$prefix = $Name if $PArgs->{add_prefix};
$prefix = $PArgs->{prefix} if $PArgs->{prefix};
my $xml = XML::Writer->new(
- OUTPUT => $io,
+ OUTPUT => \$io,
NAMESPACES => 1,
PREFIX_MAP => { $Namespace => $prefix },
DATA_MODE => $newlines,
# the two sql strings should be identical
my $msg = "$args->{name} SQL roundtrip successful - SQL statements match";
- $ENV{SQLTTEST_RT_DEBUG} #stringify below because IO::Scalar does not behave nice
- ? eq_or_diff ("$rt_out", "$base_out", $msg)
- : ok ("$rt_out" eq "$base_out", $msg)
+ $ENV{SQLTTEST_RT_DEBUG}
+ ? eq_or_diff ($rt_out, $base_out, $msg)
+ : ok ($rt_out eq $base_out, $msg)
;
}