I had a very similar epiphany not long ago. I'm still working towards a satisfactory system, so what I have to say may not be the best advice. However, since I'm still in the trenches on this one, a few of the lessons learned are very clear to me. Here's my so-called wisdom.
- Set up a revision control system (I use CVS) that you can access remotely.
- NEVER do any coding that doesn't go into your revision control system
- Keep all those weird modules you write in the same top level name space. For example, I might have Pileofrogs::Util, Pileofrogs::Frob, Pileofrogs::Foo. Then you never have trouble finding and browsing your work. If you create something worthy of CPAN, break it out into a more appropriate namespace.
- If you find yourself writing something twice, put it in one of those modules.
- You don't have to do all the bells and whistles of a CPAN module, but you should at the very least script any installers. Even if you only have one machine, write installation scripts. They not only make installation easy, they
also serve as very precise documentation of how you installed your stuff.
- Make all your machines automatically get and install the latest version of your work, This keeps all your machine in sync.
- Try not to write two versions of a script to handle slightly different situations (like two different OSs) write one script that can handle both.
- Write scripts that help you keep your scripts in compliance with whatever system you devise. E.G. a script that can write most of your installer
for you.
If anyone thinks what I'm doing is dumb, please cry out and save me from myself and the OP from my advice.
--Pileofrogs