NAME
Mt - Provide a wrapper for the tape manager 'mt' program
SYNOPSIS
use Mt;
# initialize
$mt = Mt->new;
$mt = Mt->new(-device=>'/dev/st0',
-mtprogram=>'/usr/local/bin/mt');
# send command to tape
$mt->command(-command=>'status');
$mt->command(-command=>'fsf',
-count=>1);
DESCRIPTION
The Mt
module provides a wrapper to the tape manager mt program. It doesn't use any library calls, but rather wraps around the program 'mt' that should be installed on your system. The output of the runs of 'mt' is passed to the user along with system() return code to indicate success or failure.
METHODS
The following methods are defined in the module:
- new([Attributes]);
-
The constructor returns a newly created object which points at a specific tape device and a specific tape manager mt program.
Attributes:
-device : Tape device (defaults to /dev/tape)
-mtprogram : path to the mt program (defaults to `which mt` output)
DEBUG : set to 1 for additional output
- command(-command=>$command,-count=>$count,-args=>[ @args ]);
-
The object executes the given command through set mt program and tape device
Attributes:
-command : a valid mt command
-count : count argument for the commands requiring it
-args : reference to an array containing arguments for some commands
BUGS
When reporting bugs/problems please include as much information as possible. It may be difficult for me to reproduce the problem as almost every setup is different.
Include the OS version you have, the mt version, and the tape specification. The module has only been tested so far with RedHat Linux 7.1 and the 'mt' that comes with mt-st-0.5b-10.i386.rpm package.
AUTHOR
Roman M. Parparov <romm@empire.tau.ac.il>
SEE ALSO
COPYRIGHT
Copyright 2001-2002 Roman M. Parparov <romm@empire.tau.ac.il>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.