From: Peter Rabbitson Date: Sun, 23 Sep 2012 16:23:00 +0000 (+0200) Subject: Lose one more useless dependency X-Git-Tag: v0.11013_03~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b5bd4580fbf12e890c42cc08d135d10d1beb8224;p=dbsrgits%2FSQL-Translator.git Lose one more useless dependency --- diff --git a/Makefile.PL b/Makefile.PL index 649bfd7..b97ce6a 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -11,7 +11,6 @@ my $deps = { requires => { 'Digest::SHA' => '0', 'Carp::Clan' => '0', - 'IO::Scalar' => '2.110', 'Parse::RecDescent' => '1.967009', 'DBI' => '0', 'File::ShareDir' => '1.0', diff --git a/lib/SQL/Translator/Producer/XML/SQLFairy.pm b/lib/SQL/Translator/Producer/XML/SQLFairy.pm index 995f540..132d9c3 100644 --- a/lib/SQL/Translator/Producer/XML/SQLFairy.pm +++ b/lib/SQL/Translator/Producer/XML/SQLFairy.pm @@ -149,7 +149,6 @@ use Exporter; 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? @@ -176,14 +175,14 @@ sub produce { $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, diff --git a/t/60roundtrip.t b/t/60roundtrip.t index 35bda26..f04417f 100644 --- a/t/60roundtrip.t +++ b/t/60roundtrip.t @@ -226,9 +226,9 @@ sub check_roundtrip { # 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) ; }