Modulator - Very Quick Module Skeltons - written in Perl
Recently I stumbled upon the "modulator", a script that builds a .module, .install, and .info files for you on the fly, naming the files along with the functions as well.
The script is written in Perl, I know this is not the "Drupal" way, but it is darn easy to use. Normally you would need to build these files by hand or piece one together. There is also a "module" to build a module skeleton for you - module builder. I prefer the Modulator simply because it is faster.
The script also works a bit with SimpleTest (see below) too, a nice feature.
Here are the features (taken from script comments):
# - creates a module folder and associated file skeletons
# - generates a test class and test methods and places them in a test file
# recognized by SimpleTest. This currently only covers unit tests,
# and not higher level tests like functional or integration tests.
# - can be re-run throughout module development
# - if you add a new function to a module, rerun the script and a test
# stub will be generated and placed in the appropriate test class
# - works with existing modules
# - adds hook_simpletest to an existing module
Here is how you run the script, for those who are not familiar how to run Perl scripts (Download the script to your server first - before proceeding):
- Open up your shell (or SSH)
- Go to the directory where you put modulator.pl
- Run it with: perl modulator.pl [module_name] [group_name] [tab_space]
- You're done!
The notes in the script explain what [module_name] [group_name] [tab_space] represent. Very nice options...
What would I change? Make this into a module, to mesh with Drupal's way of doing things.
A big thank you Andy Michaels @ Achieve Internet!