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

Re: Improve modularity of toplevel Perl scripts



On Tue, Aug 28, 2001 at 02:46:10PM +0200, Denis Barbier wrote:
> 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.

Indeed.

> 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.

Putting Perl/ in there would probably require a kludge here and there, but
if you're willing to work on this I will only watch ;)

-- 
     2. That which causes joy or happiness.



Reply to: