Util::PseudoFtool (version $)


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
# HISTORY: $Log: PseudoFtool.pm,v $
# HISTORY: Revision 1.3  2014/02/27 07:01:07  apsop
# HISTORY: VERSION header now shows CVS Revision
# HISTORY:
# HISTORY: Revision 1.2  2006/08/01 20:35:34  apsop
# HISTORY: Add in CVS history indicator.
# HISTORY:
# 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: $Revision: 1.3 $
#
##############################################################################

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;