aboutsummaryrefslogtreecommitdiff
path: root/databases/p5-SQL-Translator
diff options
context:
space:
mode:
authorLars Thegler <lth@FreeBSD.org>2004-10-24 19:59:22 +0000
committerLars Thegler <lth@FreeBSD.org>2004-10-24 19:59:22 +0000
commit4fa3f58c5b12d7f576786b317b657527eca45dbe (patch)
tree2714ed6be5e6495fcf1ff13622cc1fbba1f298d3 /databases/p5-SQL-Translator
parent9f77225ee7c98b0485a054038a722e8133001cf7 (diff)
downloadports-4fa3f58c5b12d7f576786b317b657527eca45dbe.tar.gz
ports-4fa3f58c5b12d7f576786b317b657527eca45dbe.zip
Notes
Diffstat (limited to 'databases/p5-SQL-Translator')
-rw-r--r--databases/p5-SQL-Translator/Makefile10
-rw-r--r--databases/p5-SQL-Translator/files/5.005_03-patch-lib::SQL::Translator::Parser::Excel.pm15
-rw-r--r--databases/p5-SQL-Translator/files/5.005_03-patch-lib::SQL::Translator::Producer::XML::SQLFairy.pm40
-rw-r--r--databases/p5-SQL-Translator/files/5.005_03-patch-t::16xml-parser.t32
-rw-r--r--databases/p5-SQL-Translator/files/5.005_03-patch-t::17sqlfxml-producer.t98
-rw-r--r--databases/p5-SQL-Translator/files/5.005_03-patch-t::18ttschema-producer.t28
6 files changed, 21 insertions, 202 deletions
diff --git a/databases/p5-SQL-Translator/Makefile b/databases/p5-SQL-Translator/Makefile
index 87a54b4a1804..11c3815336f6 100644
--- a/databases/p5-SQL-Translator/Makefile
+++ b/databases/p5-SQL-Translator/Makefile
@@ -7,6 +7,7 @@
PORTNAME= SQL-Translator
PORTVERSION= 0.06
+PORTREVISION= 1
CATEGORIES= databases perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= SQL
@@ -91,8 +92,7 @@ MAN3= SQL::Translator.3 \
.if ${PERL_LEVEL} < 500600
BUILD_DEPENDS+= ${SITE_PERL}/File/Spec.pm:${PORTSDIR}/devel/p5-File-Spec \
${SITE_PERL}/${PERL_ARCH}/IO/Dir.pm:${PORTSDIR}/devel/p5-IO
-EXTRA_PATCHES+= ${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Parser::Excel.pm \
- ${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Parser::xSV.pm \
+EXTRA_PATCHES+= ${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Parser::xSV.pm \
${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Producer::Diagram.pm \
${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Producer::GraphViz.pm \
${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Producer::HTML.pm \
@@ -100,11 +100,9 @@ EXTRA_PATCHES+= ${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Parser::Excel.p
${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Schema::Table.pm \
${PATCHDIR}/5.005_03-patch-lib::SQL::Translator::Utils.pm \
${PATCHDIR}/5.005_03-patch-t::05bgep-re.t \
- ${PATCHDIR}/5.005_03-patch-t::16xml-parser.t \
- ${PATCHDIR}/5.005_03-patch-t::17sqlfxml-producer.t \
- ${PATCHDIR}/5.005_03-patch-t::18ttschema-producer.t \
${PATCHDIR}/5.005_03-patch-t::19sybase-parser.t \
- ${PATCHDIR}/5.005_03-patch-t::27sqlite-parser.t
+ ${PATCHDIR}/5.005_03-patch-t::27sqlite-parser.t \
+ ${PATCHDIR}/5.005_03-patch-t::31dumper.t
.endif
diff --git a/databases/p5-SQL-Translator/files/5.005_03-patch-lib::SQL::Translator::Parser::Excel.pm b/databases/p5-SQL-Translator/files/5.005_03-patch-lib::SQL::Translator::Parser::Excel.pm
deleted file mode 100644
index d9f537f04290..000000000000
--- a/databases/p5-SQL-Translator/files/5.005_03-patch-lib::SQL::Translator::Parser::Excel.pm
+++ /dev/null
@@ -1,15 +0,0 @@
---- lib/SQL/Translator/Parser/Excel.pm.orig Sun May 9 14:49:45 2004
-+++ lib/SQL/Translator/Parser/Excel.pm Sun May 9 14:50:21 2004
-@@ -183,9 +183,9 @@
- $size = [ $size->[0] + $size->[1] ];
- }
-
-- my $field = $table->get_field( $field );
-- $field->size( $size ) if $size;
-- $field->data_type( $data_type );
-+ my $f = $table->get_field( $field );
-+ $f->size( $size ) if $size;
-+ $f->data_type( $data_type );
- }
- }
- }
diff --git a/databases/p5-SQL-Translator/files/5.005_03-patch-lib::SQL::Translator::Producer::XML::SQLFairy.pm b/databases/p5-SQL-Translator/files/5.005_03-patch-lib::SQL::Translator::Producer::XML::SQLFairy.pm
index 038d908420f6..3dec8c3d081f 100644
--- a/databases/p5-SQL-Translator/files/5.005_03-patch-lib::SQL::Translator::Producer::XML::SQLFairy.pm
+++ b/databases/p5-SQL-Translator/files/5.005_03-patch-lib::SQL::Translator::Producer::XML::SQLFairy.pm
@@ -1,23 +1,17 @@
---- lib/SQL/Translator/Producer/XML/SQLFairy.pm.orig Sun May 9 15:11:42 2004
-+++ lib/SQL/Translator/Producer/XML/SQLFairy.pm Sun May 9 15:13:45 2004
-@@ -224,9 +224,9 @@
- # Use array to ensure consistant (ie not hash) ordering of attribs
- # The order comes from the meths list passes in.
- my @attr = map {
-- my $val = $obj->$_;
-+ my $val = $obj->$_();
- ($_ => ref($val) eq 'ARRAY' ? join(', ', @$val) : $val);
-- } grep { defined $obj->$_ } @meths;
-+ } grep { defined $obj->$_() } @meths;
- $empty_tag ? $xml->emptyTag( [ $Namespace => $tag ], @attr )
- : $xml->startTag( [ $Namespace => $tag ], @attr );
- }
-@@ -247,7 +247,7 @@
- my $emit_empty = $PArgs->{'emit_empty_tags'};
-
- for my $method ( @methods ) {
-- my $val = $obj->$method;
-+ my $val = $obj->$method();
- debug " ".ref($obj)."->$method=",
- (defined $val ? "'$val'" : "<UNDEF>");
- next unless $emit_empty || defined $val;
+--- lib/SQL/Translator/Producer/XML/SQLFairy.pm.orig Fri Sep 3 16:27:14 2004
++++ lib/SQL/Translator/Producer/XML/SQLFairy.pm Sun Oct 24 17:00:03 2004
+@@ -349,11 +349,11 @@
+ # The order comes from the meths list passed in.
+ my @tags;
+ my @attr;
+- foreach ( grep { defined $obj->$_ } @meths ) {
++ foreach ( grep { defined $obj->$_() } @meths ) {
+ my $what = m/$elements_re/ ? \@tags : \@attr;
+ my $val = $_ eq 'extra'
+- ? { $obj->$_ }
+- : $obj->$_;
++ ? { $obj->$_() }
++ : $obj->$_();
+ $val = ref $val eq 'ARRAY' ? join(',', @$val) : $val;
+ push @$what, $_ => $val;
+ };
diff --git a/databases/p5-SQL-Translator/files/5.005_03-patch-t::16xml-parser.t b/databases/p5-SQL-Translator/files/5.005_03-patch-t::16xml-parser.t
deleted file mode 100644
index 2a37100b9b5b..000000000000
--- a/databases/p5-SQL-Translator/files/5.005_03-patch-t::16xml-parser.t
+++ /dev/null
@@ -1,32 +0,0 @@
---- t/16xml-parser.t.orig Sun May 9 19:15:25 2004
-+++ t/16xml-parser.t Sun May 9 19:27:08 2004
-@@ -12,7 +12,7 @@
-
- use strict;
- use Test::More;
--use Test::Exception;
-+#use Test::Exception; # not actually used
-
- use strict;
- use Data::Dumper;
-@@ -49,16 +49,16 @@
- if ( exists $test->{$attr} ) {
- my $ans = $test->{$attr};
- if ( $attr =~ m/^is_/ ) {
-- if ($ans) { ok $fld->$attr, "$name - $attr true"; }
-- else { ok !$fld->$attr, "$name - $attr false"; }
-+ if ($ans) { ok $fld->$attr(), "$name - $attr true"; }
-+ else { ok !$fld->$attr(), "$name - $attr false"; }
- }
- else {
-- is $fld->$attr, $ans, "$name - $attr = '"
-+ is $fld->$attr(), $ans, "$name - $attr = '"
- .(defined $ans ? $ans : "NULL" )."'";
- }
- }
- else {
-- ok !$fld->$attr, "$name - $attr not set";
-+ ok !$fld->$attr(), "$name - $attr not set";
- }
- }
- }
diff --git a/databases/p5-SQL-Translator/files/5.005_03-patch-t::17sqlfxml-producer.t b/databases/p5-SQL-Translator/files/5.005_03-patch-t::17sqlfxml-producer.t
deleted file mode 100644
index b0a4170e60cb..000000000000
--- a/databases/p5-SQL-Translator/files/5.005_03-patch-t::17sqlfxml-producer.t
+++ /dev/null
@@ -1,98 +0,0 @@
---- t/17sqlfxml-producer.t.orig Sun May 9 20:51:50 2004
-+++ t/17sqlfxml-producer.t Sun May 9 20:55:44 2004
-@@ -8,7 +8,10 @@
-
- use strict;
- use Test::More;
--use Test::Exception;
-+use vars '$no_test_exception';
-+$no_test_exception = 0;
-+eval { require Test::Exception; };
-+$no_test_exception = $@;
-
- use Data::Dumper;
- my %opt;
-@@ -149,7 +152,12 @@
- from => 'MySQL',
- to => 'XML-SQLFairy',
- );
--lives_ok {$xml = $obj->translate($file);} "Translate (emit_empty_tags=>0) ran";
-+if ($no_test_exception) {
-+ $xml = $obj->translate($file);
-+ pass "Translate (emit_empty_tags=>0) ran";
-+} else {
-+ lives_ok {$xml = $obj->translate($file);} "Translate (emit_empty_tags=>0) ran";
-+}
- ok("$xml" ne "" ,"Produced something!");
- print "XML:\n$xml" if DEBUG;
- # Strip sqlf header with its variable date so we diff safely
-@@ -270,7 +278,12 @@
- to => 'XML-SQLFairy',
- producer_args => { emit_empty_tags => 1 },
- );
--lives_ok { $xml=$obj->translate($file); } "Translate (emit_empty_tags=>1) ran";
-+if ($no_test_exception) {
-+ $xml=$obj->translate($file);
-+ pass "Translate (emit_empty_tags=>1) ran";
-+} else {
-+ lives_ok { $xml=$obj->translate($file); } "Translate (emit_empty_tags=>1) ran";
-+}
- ok("$xml" ne "" ,"Produced something!");
- print "XML emit_empty_tags=>1:\n$xml" if DEBUG;
- # Strip sqlf header with its variable date so we diff safely
-@@ -314,7 +327,12 @@
- to => "XML-SQLFairy",
- producer_args => { attrib_values => 1 },
- );
--lives_ok {$xml = $obj->translate($file);} "Translate (attrib_values=>1) ran";
-+if ($no_test_exception) {
-+ $xml = $obj->translate($file);
-+ pass "Translate (attrib_values=>1) ran";
-+} else {
-+ lives_ok {$xml = $obj->translate($file);} "Translate (attrib_values=>1) ran";
-+}
- ok("$xml" ne "" ,"Produced something!");
- print "XML attrib_values=>1:\n$xml" if DEBUG;
- # Strip sqlf header with its variable date so we diff safely
-@@ -364,7 +382,12 @@
-
- # As we have created a Schema we give translate a dummy string so that
- # it will run the produce.
-- lives_ok {$xml =$obj->translate("FOO");} "Translate (View) ran";
-+ if ($no_test_exception) {
-+ $xml =$obj->translate("FOO");
-+ pass "Translate (View) ran";
-+ } else {
-+ lives_ok {$xml =$obj->translate("FOO");} "Translate (View) ran";
-+ }
- ok("$xml" ne "" ,"Produced something!");
- print "XML attrib_values=>1:\n$xml" if DEBUG;
- # Strip sqlf header with its variable date so we diff safely
-@@ -418,7 +441,12 @@
-
- # As we have created a Schema we give translate a dummy string so that
- # it will run the produce.
-- lives_ok {$xml =$obj->translate("FOO");} "Translate (Trigger) ran";
-+ if ($no_test_exception) {
-+ $xml =$obj->translate("FOO");
-+ pass "Translate (Trigger) ran";
-+ } else {
-+ lives_ok {$xml =$obj->translate("FOO");} "Translate (Trigger) ran";
-+ }
- ok("$xml" ne "" ,"Produced something!");
- print "XML attrib_values=>1:\n$xml" if DEBUG;
- # Strip sqlf header with its variable date so we diff safely
-@@ -472,7 +500,12 @@
-
- # As we have created a Schema we give translate a dummy string so that
- # it will run the produce.
-- lives_ok {$xml =$obj->translate("FOO");} "Translate (Procedure) ran";
-+ if ($no_test_exception) {
-+ $xml =$obj->translate("FOO");
-+ pass "Translate (Procedure) ran";
-+ } else {
-+ lives_ok {$xml =$obj->translate("FOO");} "Translate (Procedure) ran";
-+ }
- ok("$xml" ne "" ,"Produced something!");
- print "XML attrib_values=>1:\n$xml" if DEBUG;
- # Strip sqlf header with its variable date so we diff safely
diff --git a/databases/p5-SQL-Translator/files/5.005_03-patch-t::18ttschema-producer.t b/databases/p5-SQL-Translator/files/5.005_03-patch-t::18ttschema-producer.t
deleted file mode 100644
index efd187dbf7e4..000000000000
--- a/databases/p5-SQL-Translator/files/5.005_03-patch-t::18ttschema-producer.t
+++ /dev/null
@@ -1,28 +0,0 @@
---- t/18ttschema-producer.t.orig Sun May 9 20:56:35 2004
-+++ t/18ttschema-producer.t Sun May 9 20:57:54 2004
-@@ -6,7 +6,10 @@
-
- use strict;
- use Test::More;
--use Test::Exception;
-+use vars '$no_test_exception';
-+$no_test_exception = 0;
-+eval { require Test::Exception; };
-+$no_test_exception = $@;
-
- use Data::Dumper;
- use vars '%opt';
-@@ -47,7 +50,12 @@
- },
- );
- my $out;
--lives_ok { $out = $obj->translate; } "Translate ran";
-+if ($no_test_exception) {
-+ $out = $obj->translate;
-+ pass "Translate ran";
-+} else {
-+ lives_ok { $out = $obj->translate; } "Translate ran";
-+}
- ok $out ne "" ,"Produced something!";
- local $/ = undef; # slurp
- eq_or_diff $out, <DATA> ,"Output looks right";