Welcome to the Monastery | |
PerlMonks |
poor man's IDEby pc88mxer (Vicar) |
on Jun 29, 2008 at 23:15 UTC ( [id://694660]=CUFP: print w/replies, xml ) | Need Help?? |
Here's a simple idea that others might find useful. Lately I've been playing around with Google Appengine. Like Catalyst and Ruby on Rails, you create directory for your project, and you often need to refer to this directory to access project specific scripts and files. The problem is that I often don't use a GUI editor for development, and so I navigate around my project files using cd and ls. Consequently, when it comes time to run a project-related command, my current working directory could be anywhere in my project tree.
A way I've found to mitigate this is to mark the project root by creating a special file there - like .appengine. Then I write a script that can be used with all AppEngine projects that goes something like this:
appcfg.py update project_rootInstead of having to remember what my project root is, I can just type: appeng updateand the appeng script will run the correct command for me. Another example: using the appdir command you can quickly cd to your project's root with: Of course, this can be made a shell alias or function. This script also serves as a way of defining shortcuts for frequently run commands much like a Makefile. Indeed, I often write a make command for these kinds of scripts that will perform a cd and execute a top-level make. Also, I've found this approach to be very helpful when working on multiple versions of a project each in their own directory. I'm sure I'm not the first person to think of this idea, but I've found it very useful, so I thought I'd share it. And I decided to write it in perl.
Back to
Cool Uses for Perl
|
|