#!/usr/local/bin/perl eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}' if 0; # not running under some shell use strict; use warnings; use vars '$VERSION'; $VERSION = 0.7; use Getopt::Long qw[]; Getopt::Long::Configure( "no_ignore_case" ); Getopt::Long::Configure( "bundling" ); Getopt::Long::GetOptions( 'v|verbose' => \( my $verbose = 0 ), 'h|help|?' => sub { usage( -verbose => 1 ); exit; }, 'H|man' => sub { usage( -verbose => 2 ); exit; }, 'V|version' => sub { version(); exit; }, ) or exit 1; my $word = shift(@ARGV) or usage( "$0: missing word\n" ); my @check = ( 'ANSI/ISO SQL' => 'SQL::ReservedWords', 'DB2' => 'SQL::ReservedWords::DB2', 'MySQL' => 'SQL::ReservedWords::MySQL', 'ODBC' => 'SQL::ReservedWords::ODBC', 'Oracle' => 'SQL::ReservedWords::Oracle', 'PostgreSQL' => 'SQL::ReservedWords::PostgreSQL', 'SQLite' => 'SQL::ReservedWords::SQLite', 'SQL Server' => 'SQL::ReservedWords::SQLServer', 'Sybase' => 'SQL::ReservedWords::Sybase' ); my @reserved_by = (); while ( my ( $name, $package ) = splice( @check, 0, 2 ) ) { eval "require $package;"; die $@ if $@; if ( $package->is_reserved( $word ) ) { push @reserved_by, $verbose ? $package->reserved_by($word) : $name; } } my $reserved_by = join "\n ", @reserved_by; print < =head1 COPYRIGHT This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. =cut