SQL::ReservedWords::MySQL - Reserved SQL words by MySQL
if ( SQL::ReservedWords::MySQL->is_reserved("accessible") ) { die "Don't use reserved words in column names!"; } # or use SQL::ReservedWords::MySQL 'is_reserved'; if ( is_reserved("group") ) { die "Don't use reserved words in column names!"; }
Determine if words are reserved by MySQL.
Returns a boolean indicating if $word is reserved by either MySQL 3.2, 4.0, 4.1, 5.0 or 5.1.
$word
Returns a boolean indicating if $word is reserved by MySQL 3.2.
Returns a boolean indicating if $word is reserved by MySQL 4.0 or 4.1.
Returns a boolean indicating if $word is reserved by MySQL 5.0 or 5.1.
Returns a list with all reserved words.
Nothing by default. Following subroutines can be exported:
http://dev.mysql.com/doc/refman/4.1/en/reserved-words.html
http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html
http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html
Christian Hansen ch@ngmedia.com
ch@ngmedia.com
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
To install SQL::ReservedWords::MySQL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SQL::ReservedWords::MySQL
CPAN shell
perl -MCPAN -e shell install SQL::ReservedWords::MySQL
For more information on module installation, please visit the detailed CPAN module installation guide.