package SQL::Translator;
# ----------------------------------------------------------------------
-# $Id: Translator.pm,v 1.51 2004-02-04 17:51:00 kycl4rk Exp $
+# $Id: Translator.pm,v 1.54 2004-03-09 19:15:31 kycl4rk Exp $
# ----------------------------------------------------------------------
-# Copyright (C) 2003 The SQLFairy Authors
+# Copyright (C) 2002-4 The 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
require 5.004;
-$VERSION = '0.04';
-$REVISION = sprintf "%d.%02d", q$Revision: 1.51 $ =~ /(\d+)\.(\d+)/;
+$VERSION = '0.05';
+$REVISION = sprintf "%d.%02d", q$Revision: 1.54 $ =~ /(\d+)\.(\d+)/;
$DEBUG = 0 unless defined $DEBUG;
$ERROR = "";
my @files = ref($filename) eq 'ARRAY' ? @$filename : ($filename);
foreach my $file (@files) {
- unless (open FH, $file) {
- return $self->error("Can't read file '$file': $!");
- }
+ unless (open FH, $file) {
+ return $self->error("Can't read file '$file': $!");
+ }
- $data .= <FH>;
+ $data .= <FH>;
- unless (close FH) {
- return $self->error("Can't close file '$file': $!");
- }
+ unless (close FH) {
+ return $self->error("Can't close file '$file': $!");
+ }
}
$self->{'data'} = \$data;
}
# ----------------------------------------------------------------------
+# version
+#
+# Returns the $VERSION of the main SQL::Translator package.
+# ----------------------------------------------------------------------
+sub version {
+ my $self = shift;
+ return $VERSION;
+}
+
+# ----------------------------------------------------------------------
sub validate {
my ( $self, $arg ) = @_;
if ( defined $arg ) {
Whether or not to validate the schema object after parsing and before
producing.
+=head2 version
+
+Returns the version of the SQL::Translator release.
+
=head1 AUTHORS
The following people have contributed to the SQLFairy project: