Документация
HTML CSS PHP PERL другое

7.1 Strategies

 
Previous Table of Contents Next

7.1 Strategies

What version of Perl was the application written for? Earlier I told you how to tell what version of Perl a particular program in a particular environment is running under, but that program could have been written by someone who was using only features provided by an earlier version of Perl. (There are still many people writing Perl 4 code, even though their programs are running on more modern Perls.)

You can find out what modules (and what versions of those modules) were installed with any release of Perl using the corelist program that comes with Richard Clamp's Module::CoreList (http://search.cpan.org/dist/Module-CoreList/).

Once you've cast an eye over your inherited program source and you have an idea of what version of Perl the programmer was coding for, your next step is to upgrade the code that can be replaced with more succinct idioms that work in the newer version of Perl that you are using. In each section that follows, I'll tell you how you might recognize a program written for that version of Perl, and then how you can upgrade a program written for an earlier version of Perl to that one. Those recommendations are cumulative; that is, you can apply the recommendations of each section until you reach the one for the version of Perl you're running.

    Previous Table of Contents Next
    © 2000- NIV