Although you didn't ask for it really, I figure I'll throw in my thoughts about what your stated goals are. Taking the exploit out of metasploit and trying to port it into your own application doesn't really help your knowledge of how the exploit works. When you look into the metasploit framework at each individual exploit, what you see is just the juicy bits you need to perform the exploit. You get just the good stuff because Metasploit has already written all of the network stuff, random character generation, and in many cases protocol stacks that you may need to do your job. If you are interested in learning more about how an FTP exploit works for instance, you don't have to learn/write anything about how to create sockets or connect or build payloads, just how to get executable code to run. If you are interested in the individual payloads, they are all explorable outside of the context of the exploit. Once you understand enough about each individual piece, then you might go to writing your own, and you would use the contents of the exploit module that you need, plus the output of msfpayload to generate your payload to do what you want.
After saying all of that, if you don't really have a good understanding of debugging, you really haven't learned anything about any of this with the exception of how to just port an exploit from one language to another. If you really want to understand what's going on , there are roughly a few hundred examples using the warftpd password exploit available on the internet. Going through there and figuring out how to get EIP and launch executable code will get you a lot further in understanding what's going on than trying to pull apart a metasploit exploit and re-assemble it in perl/python/C.
Take that for what you will though. You do need the whole trunk to ever run one of the metasploit exploits as there is a ton of stuff in the lib that isn't included under /modules. As the whole beauty of metasploit is the libraries that facilitate exploit/payload creation, without the libs you are just left with a rough outline of what is going on, you will never get the full picture.
CISSP, CSSLP, MCSE+Security, MCTS, CCSP, GPEN, GWAPT, GCWN, NOP, OSCP, Security+