[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Improve modularity of toplevel Perl scripts



Hi,

many piece of code are similar in various scripts, e.g. check_trans.pl
and stattrans.pl both parse CVS/Entries files to retrieve revision numbers.
It would be IMO very valuable to write small Perl modules and call them
instead of duplicating code.
For instance, here is a (documented, yeah ;)) Cvsinfo.pm package which
performs the task mentioned above, and check_trans.pm is a modified
version to use it; this script also fixes the bug about documents whose
original is not English.

To try it, create a webwml/Perl/ directory and put Cvsinfo.pm there.
Feel free to comment the `use lib' trick (in check_trans.pm) and propose
a better solution, the currently one is not very satisfactory, but it
seems to work.

Denis

Attachment: check_trans.pm
Description: Perl program

Attachment: Cvsinfo.pm
Description: Perl program


Reply to: