Update the Free Software Foundation's address (RT#100531)
[dbsrgits/SQL-Translator.git] / script / sqlt-graph
index 6238026..137b363 100755 (executable)
@@ -14,8 +14,8 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307  USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
 # -------------------------------------------------------------------
 
 =head1 NAME
@@ -63,6 +63,7 @@ sqlt-graph - Automatically create a graph from a database schema
     --skip-tables      Comma-separated list of table names to exclude
     --skip-tables-like Comma-separated list of regexen to exclude tables
     --debug            Print debugging information
+    --trace            Print parser trace info
 
 =head1 DESCRIPTION
 
@@ -80,9 +81,9 @@ This can prove too permissive, however, as you probably don't want a
 field called "name" to be considered a foreign key, so you could
 include it in the "skip" option, and all fields called "name" will be
 excluded from natural joins.  A more efficient method, however, might
-be to simply deduce the foriegn keys from primary keys to other fields
+be to simply deduce the foreign keys from primary keys to other fields
 named the same in other tables.  Use the "natural-join-pk" option
-to acheive this.
+to achieve this.
 
 If the schema defines foreign keys, then the graph produced will be
 directed showing the direction of the relationship.  If the foreign
@@ -117,7 +118,7 @@ my (
     $natural_join, $join_pk_only, $skip_fields, $show_datatypes,
     $show_sizes, $show_constraints, $debug, $help, $height, $width,
     $no_fields, $fontsize, $fontname, $skip_tables, $skip_tables_like,
-    $cluster
+    $cluster, $trace
 );
 
 # multi-valued options:
@@ -150,6 +151,7 @@ GetOptions(
     'show-sizes'         => \$show_sizes,
     'show-constraints'   => \$show_constraints,
     'debug'              => \$debug,
+    'trace'              => \$trace,
     'h|help'             => \$help,
 ) or die pod2usage;
 my @files = @ARGV; # the create script(s) for the original db
@@ -162,6 +164,7 @@ my $translator           =  SQL::Translator->new(
     from                 => $db_driver,
     to                   => 'GraphViz',
     debug                => $debug || 0,
+    trace                => $trace || 0,
     producer_args        => {
         out_file         => $out_file,
         layout           => $layout,