On Friday 21 May 2010 09:42:35 Thomas Bätzler wrote: > Tech list <tech_l...@womenshealth.com> asked: > > Let's say I have a module XYZ with a sub in it call ABC. I'd like to > > print the source code of XYZ::ABC. > > > > My reason for this is I accidentally overwrote a module with an older > > version, but I still have httpd running which has it loaded in memory. > > You can't print the "source code" since it's gone at that point. All that > remains is the bytecode representation of that module. You can poke around > in that using the B:: group of modules, like > http://search.cpan.org/~jesse/perl-5.12.1/ext/B/B.pm. Beware, this is not > for the faint of heart. > > HTH, > Thomas > > PS: Rule #1 of system administration and programming: _always_ make a > backup.
A better corollary to this rule is to use a good version control system for every half-serious piece of code (or any other data). See: * http://better-scm.berlios.de/ And naturally, you need to keep backups of the version control repositories or their dumps. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Funny Anti-Terrorism Story - http://shlom.in/enemy God considered inflicting XSLT as the tenth plague of Egypt, but then decided against it because he thought it would be too evil. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/