package Util::PseudoFtool; ############################################################################## # # DESCRIPTION: This class handles programs which behave like FTOOLS (i.e. # DESCRIPTION: they share the same parfile interface), but which are not part # DESCRIPTION: of the FTOOLS distribution. # # HISTORY: 1.0 -> 1.1 2002-04-18 # HISTORY: Made this a subclass of ParfileTool. In fact it is identical to # HISTORY: ParfileTool, except the constructor syntax is different for # HISTORY: convenience and backwards compatibility. # # VERSION: 1.1 # ############################################################################## use Util::ParfileTool; @ISA=("Util::ParfileTool"); use strict; ########################################################################## # The first argument is the full path name of the executable file. # The second optional argument gives the name of the directory containing # the parfile. If omitted, this defaults to the same directory as the # one containing the executable. ########################################################################### sub new { #(path,[parfile_dir]) my $self=shift; my $path=shift; my $pardir=shift || ""; my ($bin ) = $path =~/^(.*)\/[^\/]*$/; my ($tool) = $path =~ /([^\/]*)$/; if( ! $pardir) { $pardir=$bin } ##################################### # inherit the generic constructor ##################################### $self=$self->SUPER::new($tool,$pardir,[$bin],[]); return $self; } sub DESTROY { my $self = shift; # check for an overridden destructor... $self->SUPER::DESTROY if $self->can("SUPER::DESTROY"); } 1;