Take a look at
Krang which sports a build/test/install/upgrade system first discussed here on PerlMonks:
Installation System Design for a Large Apache/mod_perl Application. Someday
the Matchstick project may make this code more readily reusable.
-sam