From: Mark Addison Date: Mon, 6 Oct 2003 15:43:41 +0000 (+0000) Subject: Made debugging work and it now exports its parse method. X-Git-Tag: v0.04~121 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=96f38d80aff342dce617d6351e65107eca308b7c;p=dbsrgits%2FSQL-Translator.git Made debugging work and it now exports its parse method. --- diff --git a/lib/SQL/Translator/Parser/XML/XMI/Rational.pm b/lib/SQL/Translator/Parser/XML/XMI/Rational.pm index c9520d9..1047a7f 100644 --- a/lib/SQL/Translator/Parser/XML/XMI/Rational.pm +++ b/lib/SQL/Translator/Parser/XML/XMI/Rational.pm @@ -1,7 +1,7 @@ package SQL::Translator::Parser::XML::XMI::Rational; # ------------------------------------------------------------------- -# $Id: Rational.pm,v 1.5 2003-10-06 15:05:17 grommit Exp $ +# $Id: Rational.pm,v 1.6 2003-10-06 15:43:41 grommit Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Mark Addison , # @@ -28,12 +28,21 @@ Data Modeling Profile. =cut use strict; + +use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; +$VERSION = sprintf "%d.%02d", q$Revision: 1.6 $ =~ /(\d+)\.(\d+)/; +$DEBUG = 0 unless defined $DEBUG; +use Exporter; +use base qw(Exporter); +@EXPORT_OK = qw(parse); + use SQL::Translator::Parser::XML::XMI; use SQL::Translator::Utils 'debug'; # Set the parg for the conversion sub then use the XMI parser sub parse { my ( $translator ) = @_; + local $DEBUG = $translator->debug; my $pargs = $translator->parser_args; $pargs->{classes2schema} = \&classes2schema; return SQL::Translator::Parser::XML::XMI::parse(@_);