[OpenAFS] AFS::Command Perl Modules (was: 'vos examine', 'Last update' and date format)

Phil.Moore@morganstanley.com Phil.Moore@morganstanley.com
Tue, 2 Sep 2003 12:03:48 -0400


>>>>> "Alf" == Alf Wachsmann <alfw@SLAC.Stanford.EDU> writes:

Alf> It is still a bit early to talk about it but the AFS Perl module
Alf> will be able to do all this soon.

Alf> SLAC sponsored a student to implement the still missing bos and
Alf> vos command APIs for the Perl module.

Alf> Soon, you will be able to do:
Alf> 	use AFS::VOS; my $vos = AFS::VOS->new(); my $volinfo =
Alf> 	$vos->examine('root.cell');

Alf> 	print "Last updated: ", $volinfo->{updateDate}, "\n";

Alf> which would print something like
Alf> 	Last updated: 1046736123

Alf> We still have to sort out some "details" but the code is already
Alf> all there, so stay tuned...

And there's going to be a competing (but entirely complementary) set
of perl modules to hit CPAN soon as well.

You message provides me with incentive to announce the impending
release of the AFS::Command (and AFS::Object) module suite, which is a
pure-perl implementation, built around parsing the output or the
various command line utilities.

I also looked into implementing AFS::VOS as an XS module, but felt
that the architecture of the code would be unsupportable, since way
too much of the complex logic in vos.c would have to be replicated in
the XS code, leading to parallel management of the two code bases.  I
am more than willing to be proven wrong.

The code I have takes a different approach, and is actually a re-write
of an old perl4 (yes, perl *FOUR*) API I wrote, 10 years ago.  The
text output from vos, fs, etc is deterministic, and relatively
straight forward to parse (well, not trivial, but since I had the
parsing code already...).

Let me stress that I am NOT offering this code as *competition* for
the existing AFS modules, and in fact, that's precisely why my code
lives in the AFS::Command and AFS::Object namespaces -- to avoid a
naming clash.  I need the core AFS module for things that *must* be
done in XS (eg. setpag), and this is simply an alternative.

The code will get its first official release this week, once I finish
the docs for AFS::Command::FS (the most dubious part of the code,
since the pioctl() interface is well suited for an XS module).

If there's interest in this code, I've put a preliminary release of
the HTML docs up on my personal domain's website:

http://www.yume.org/oss/perl/AFS-Command-prerelease/README.html
http://www.yume.org/oss/perl/AFS-Command-prerelease/Command.html
http://www.yume.org/oss/perl/AFS-Command-prerelease/Object.html
http://www.yume.org/oss/perl/AFS-Command-prerelease/Command/Base.html
http://www.yume.org/oss/perl/AFS-Command-prerelease/Command/VOS.html
http://www.yume.org/oss/perl/AFS-Command-prerelease/Command/BOS.html
http://www.yume.org/oss/perl/AFS-Command-prerelease/Command/PTS.html
http://www.yume.org/oss/perl/AFS-Command-prerelease/Command/FS.html

The CPAN release should be coming later this week.

This release is also just the beginning, 'cause I have a long list of
ideas for enhancing it, and improving the OO API, in particular.  I
expect a 1.1 release to follow the 1.0 after a month or two.