From: Ken Youens-Clark Date: Wed, 20 Aug 2003 22:19:14 +0000 (+0000) Subject: Added small transform to turn "XML-SQLFairy" into "XML::SQLFairy" so that X-Git-Tag: v0.04~276 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=af05a25f8b28362e6952551e60c92642962cbd75;p=dbsrgits%2FSQL-Translator.git Added small transform to turn "XML-SQLFairy" into "XML::SQLFairy" so that we can create hierarchical namespaces for the parsers and producers and not have them mixed up with other modules. --- diff --git a/lib/SQL/Translator.pm b/lib/SQL/Translator.pm index 319cea7..a50fa5f 100644 --- a/lib/SQL/Translator.pm +++ b/lib/SQL/Translator.pm @@ -1,7 +1,7 @@ package SQL::Translator; # ---------------------------------------------------------------------- -# $Id: Translator.pm,v 1.40 2003-08-20 13:50:46 dlc Exp $ +# $Id: Translator.pm,v 1.41 2003-08-20 22:19:14 kycl4rk Exp $ # ---------------------------------------------------------------------- # Copyright (C) 2003 Ken Y. Clark , # darren chamberlain , @@ -29,7 +29,7 @@ use base 'Class::Base'; require 5.004; $VERSION = '0.02'; -$REVISION = sprintf "%d.%02d", q$Revision: 1.40 $ =~ /(\d+)\.(\d+)/; +$REVISION = sprintf "%d.%02d", q$Revision: 1.41 $ =~ /(\d+)\.(\d+)/; $DEBUG = 0 unless defined $DEBUG; $ERROR = ""; @@ -195,6 +195,7 @@ sub producer { # passed a string containing no "::"; relative package name else { + $producer =~ s/-/::/g; my $Pp = sprintf "SQL::Translator::Producer::$producer"; load($Pp) or die "Can't load $Pp: $@"; $self->{'producer'} = \&{ "$Pp\::produce" }; @@ -287,6 +288,7 @@ sub parser { # passed a string containing no "::"; relative package name else { + $parser =~ s/-/::/g; my $Pp = "SQL::Translator::Parser::$parser"; load( $Pp ) or die "Can't load $Pp: $@"; $self->{'parser'} = \&{ "$Pp\::parse" };