From: Mark Addison Date: Tue, 21 Dec 2004 01:29:23 +0000 (+0000) Subject: Removed (annoying) warning when order attributes are not used. X-Git-Tag: v0.11008~579 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=53a533efd3d31030564a8d9d480b7209abd4ef35;p=dbsrgits%2FSQL-Translator.git Removed (annoying) warning when order attributes are not used. --- diff --git a/lib/SQL/Translator/Parser/XML/SQLFairy.pm b/lib/SQL/Translator/Parser/XML/SQLFairy.pm index 7a12136..86cec9b 100644 --- a/lib/SQL/Translator/Parser/XML/SQLFairy.pm +++ b/lib/SQL/Translator/Parser/XML/SQLFairy.pm @@ -1,7 +1,7 @@ package SQL::Translator::Parser::XML::SQLFairy; # ------------------------------------------------------------------- -# $Id: SQLFairy.pm,v 1.12 2004-11-05 15:03:09 grommit Exp $ +# $Id: SQLFairy.pm,v 1.13 2004-12-21 01:29:23 grommit Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Mark Addison , # @@ -100,7 +100,7 @@ To convert your old format files simply pass them through the translator :) use strict; use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.12 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.13 $ =~ /(\d+)\.(\d+)/; $DEBUG = 0 unless defined $DEBUG; use Data::Dumper; @@ -129,9 +129,9 @@ sub parse { ); for my $tblnode ( sort { - "".$xp->findvalue('sqlf:order|@order',$a) + ("".$xp->findvalue('sqlf:order|@order',$a) || 0) <=> - "".$xp->findvalue('sqlf:order|@order',$b) + ("".$xp->findvalue('sqlf:order|@order',$b) || 0) } @nodes ) { debug "Adding table:".$xp->findvalue('sqlf:name',$tblnode);