Subject: Announcing: VMS::Device 0.01
From: Dan Sugalski <[email-masked]>
Date: 2 Jun 1998 18:46:11 GMT
Newsgroups: comp.lang.perl.announce,comp.lang.perl.modules

Announcing: VMS::Device 0.01

This is the first public release of VMS::Device. With this module you
can list devices (by class, type, and/or name, with wild cards) and
fetch information about those devices. It essentially provides the
functionality of the DCL lexicals F$DEVICE and F$GETDVI.

For example, with this little program:

    #! perl -w
    use VMS::Device qw(device_list device_info);

    foreach my $devname (device_list("*", "DISK")) {
      $DevHash = device_info($devname);
      $FreeBlocks = $DevHash->{FREEBLOCKS};
      $MaxBlocks = $DevHash->{MAXBLOCK};
      next unless $DevHash->{MOUNTCNT};
      next unless $MaxBlocks;
      $PctFree = int(($FreeBlocks/$MaxBlocks) * 100);
      if ($PctFree < 10) {
        print "Only $PctFree\% on $devname ($FreeBlocks of
$MaxBlocks)\n";
      }
    }

you can list out all the disks on your system that have less than 10%
free space left.

Future releases of VMS::Device will include the capabilities to mount,
dismount, allocate, deallocate, and initialize devices, but that code's
not done yet.

Available on CPAN at
$CPAN/modules/by-author/Dan_Sugalski/VMS-Device-0_01.zip, via the web at
http://www.sidhe.org/misc/VMS-Device-0_01.zip, or via ftp at
ftp://ftp.sidhe.org/VMS-Device-0_01.zip.

The module's only been tested on OpenVMS Alpha 7.1, so it's undoubtedly
got Vax and prior version issues. (Hey, it's a first beta release!)
Please, if you try it and it doesn't work, send me some mail and I'll do
what I can to fix it.