From: Allen Day Date: Sat, 19 Apr 2003 22:58:12 +0000 (+0000) Subject: asdf X-Git-Tag: v0.02~182 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=77a87d30d1c9405bfac59d76eed93e978f250292;p=dbsrgits%2FSQL-Translator.git asdf --- diff --git a/lib/SQL/Translator/Producer/ClassDBI.pm b/lib/SQL/Translator/Producer/ClassDBI.pm index 2f07c24..9bd147f 100755 --- a/lib/SQL/Translator/Producer/ClassDBI.pm +++ b/lib/SQL/Translator/Producer/ClassDBI.pm @@ -1,7 +1,7 @@ package SQL::Translator::Producer::ClassDBI; # ------------------------------------------------------------------- -# $Id: ClassDBI.pm,v 1.2 2003-04-19 01:32:27 kycl4rk Exp $ +# $Id: ClassDBI.pm,v 1.3 2003-04-19 22:58:12 allenday Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Ying Zhang , # Allen Day , @@ -23,7 +23,7 @@ package SQL::Translator::Producer::ClassDBI; use strict; use vars qw[ $VERSION $DEBUG ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.2 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/; $DEBUG = 1 unless defined $DEBUG; use Data::Dumper; @@ -103,11 +103,8 @@ sub produce { $create .= "1;\n\n\n"; } - - open( FILE, '>DBI.pm') or die( "Can't open file : $!"); - print ( FILE $create); - close ( FILE ) or die( "Can't close file : $!"); - + + return $create; } @@ -121,9 +118,9 @@ sub _from { } elsif ( $from eq 'PostgreSQL') { $from = 'Pg'; } elsif ( $from eq 'Oracle') { - + $from = 'Oracle'; } else { - print "Eoorr\n"; + die "__PACKAGE__ can't handle vendor $from"; } return $from;