String::SQLColumnName
ABSTRACT: Fix strings into valid SQL column names
String::CamelCase
Lingua::EN::Numbers
sql_column_names(@column_name_input)
Returns SQL-compatible and unique column names from a series of strings.
fix_name(); fix_names();
Combine fix_number(), fix_ordinal(), fix_reserved() and fix_chars()
fix_chars();
Eliminates invalid characters from column name
fix_number('12 months'); # twelve_months fix_number('52 weeks total'); # fifty_two_weeks_total
Eliminates starting numbers from string by traslating them to text
fix_ordinal('1st_date'); # first_date
Fixes ordinals in the string
fix_reserved('group'); # group_
Adds an underscore to column whose name is a reserved word.
To install String::SQLColumnName, copy and paste the appropriate command in to your terminal.
cpanm
cpanm String::SQLColumnName
CPAN shell
perl -MCPAN -e shell install String::SQLColumnName
For more information on module installation, please visit the detailed CPAN module installation guide.