Deprecate SQL::Translator::Schema::Graph, undocument as_graph()
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Schema.pm
index 4144b50..2c725ba 100644 (file)
@@ -1,23 +1,5 @@
 package SQL::Translator::Schema;
 
-# ----------------------------------------------------------------------
-# Copyright (C) 2002-2009 SQLFairy Authors
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; version 2.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# 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
-# -------------------------------------------------------------------
-
 =pod
 
 =head1 NAME
@@ -45,6 +27,7 @@ returns the database structure.
 =cut
 
 use strict;
+use warnings;
 use SQL::Translator::Schema::Constants;
 use SQL::Translator::Schema::Procedure;
 use SQL::Translator::Schema::Table;
@@ -52,11 +35,10 @@ use SQL::Translator::Schema::Trigger;
 use SQL::Translator::Schema::View;
 
 use SQL::Translator::Utils 'parse_list_arg';
+use Carp;
 
 use base 'SQL::Translator::Schema::Object';
-use vars qw[ $VERSION ];
-
-$VERSION = '1.59';
+our $VERSION = '1.59';
 
 __PACKAGE__->_attributes(qw/name database translator/);
 
@@ -75,15 +57,14 @@ sub new {
   return $self;
 }
 
+# FIXME - to be removed, together with the SQL::Translator::Schema::Graph* stuff
+# looks like a remnant of the Turnkey project integration back in 2003-4
+# Appears to be quite dead
 sub as_graph {
 
-=pod
-
-=head2 as_graph
-
-Returns the schema as an L<SQL::Translator::Schema::Graph> object.
+    eval { require Class::MakeMethods }
+      or croak 'You need to install the CPAN dependency Class::MakeMethods to use as_graph()';
 
-=cut
     require  SQL::Translator::Schema::Graph;
 
     my $self = shift;