From: Ken Youens-Clark Date: Thu, 24 Apr 2003 20:02:31 +0000 (+0000) Subject: Added defaults to arguments. X-Git-Tag: v0.02~171 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0a0c85e8faccc5f1c3f7d8c696c7638245bb76b0;p=dbsrgits%2FSQL-Translator.git Added defaults to arguments. --- diff --git a/lib/SQL/Translator/Producer/GraphViz.pm b/lib/SQL/Translator/Producer/GraphViz.pm index 8b8d8ab..b0b27b8 100644 --- a/lib/SQL/Translator/Producer/GraphViz.pm +++ b/lib/SQL/Translator/Producer/GraphViz.pm @@ -1,7 +1,7 @@ package SQL::Translator::Producer::GraphViz; # ------------------------------------------------------------------- -# $Id: GraphViz.pm,v 1.1 2003-04-24 16:15:13 kycl4rk Exp $ +# $Id: GraphViz.pm,v 1.2 2003-04-24 20:02:31 kycl4rk Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Ken Y. Clark # @@ -26,7 +26,7 @@ use Data::Dumper; use SQL::Translator::Utils qw(debug); use vars qw[ $VERSION $DEBUG ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.2 $ =~ /(\d+)\.(\d+)/; $DEBUG = 0 unless defined $DEBUG; use constant VALID_LAYOUT => { @@ -83,10 +83,10 @@ sub produce { debug("Data =\n", Dumper( $data )); debug("Producer args =\n", Dumper( $args )); - my $out_file = $args->{'out_file'}; - my $layout = $args->{'layout'}; - my $node_shape = $args->{'node_shape'}; - my $output_type = $args->{'output_type'}; + my $out_file = $args->{'out_file'} || ''; + my $layout = $args->{'layout'} || 'neato'; + my $node_shape = $args->{'node_shape'} || 'ellipse'; + my $output_type = $args->{'output_type'} || 'png'; my $add_color = $args->{'add_color'}; my $natural_join = $args->{'natural_join'}; my $join_pk_only = $args->{'join_pk_only'};