[Dirvish] Some unfinished code for Dirvish 1.3khl

Keith Lofstrom keithl at kl-ic.com
Fri Feb 11 01:17:44 PST 2005


After a long day of creative typing, I have some unfinished code for
dirvish 1.3 at  http://www.divish.org/viewcvs/dirvish_1_3_khl/ .

Here are some of the things I did:

1)  I refactored all the subroutines from all the modules into
    dirvishlib.pl .  This eliminates the frankenstein paste-up
    that  install.sh  currently does, and also makes it a lot 
    easier to create new apps, as well as keep the current 
    apps in synchronization.  

2)  I added a "--reset default" behavior, which will help
    with testing.  This is backed up with a new subroutine, 
    reset_options, with replaces the old inline code that
    set up the Options hash.

3)  I cleaned up the Options hash, replacing a lot of the
    anonymous subroutines with named subroutines.  It is a
    lot more readable.

4)  I converted all the documentation to Pod.  This was easy when
    I started with the .html docs from the website, and converted
    them with html2pod.  They convert nicely back to man pages 
    with pod2man -c "" -section 8 ...  .  Not identical to
    the original man files, but equally readable.

5)  I put in most of the patches that Eric wanted.  I will put
    in the rest later.

6)  I started adding more comments.  

7)  Plus lots more.

The applications are quite a bit shorter.  That means they no
longer match up with Eric's patches;  I had to put those in

I have done nothing that breaks the current runtime behavior
(I hope).  There is some pretty squirrely behavior in the
current version, though, and we may change some things for
1.5 and beyond, necessitating changes to some configurations. 
Consider yourself warned.  But we have more important things
to fix now, most importantly the install.

This code is by no means complete.  It probably does not even
run.  But I did want to suggest some things and learn some
things, and continue the momentum towards 1.3.1 begun by Doug
and Eric and others.  I want to have some consensus before we
release the 1.3.1 version, even if it is only experimental, so
please don't treat my suggestions as mandates.  Not yet :-)

Still to do - learn about MakeMaker, and set up an install
process that works like most Perl apps do.  We should work
towards making this compatable with CPAN.

And still to do - I want to write dirvish-restore-file, a
perl application that helps the sysadmin do file and directory
restores.  This will be a lot easier after this refactoring,
and perhaps after we break off some more chunks of the
existing programs and make them into subroutines.

And also still to do - start building some test harnesses. 
This will be from fake directory to fake directory on the
server;  the install should still happen even if rsync and
ssh aren't working yet, but it would be nice to have a test
that works after they are configured.  We probably won't
get started on test harnesses until 1.3.2 .  

We should at least make the code work with "use strict", though.


Keith Lofstrom          keithl at keithl.com         Voice (503)-520-1993
KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs

More information about the Dirvish mailing list