Tapper Team > Tapper-Action-4.1.1 > Tapper::Base

Download:
Tapper-Action-4.1.1.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 4.1.1   Source  

NAME ^

Tapper::Base - Tapper - Common functions for all Tapper classes

SYNOPSIS ^

 package Tapper::Some::Class;
 use Moose;
 extends 'Tapper::Base';

FUNCTIONS ^

kill_instance

Kill the process whose id is in the given pidfile.

@param string - pid file name

@return success - 0 @return error - error string

run_one

Run one instance of the given command. Kill previous incarnations if necessary.

@param hash ref - {command => command to execute, pid_file => pid file containing the ID of last incarnation, argv => array ref containg (optional) arguments}

@return success - 0 @return error - error string

makedir

Checks whether a given directory exists and creates it if not.

@param string - directory to create

@return success - 0 @return error - error string

log_and_exec

Execute a given command. Make sure the command is logged if requested and none of its output pollutes the console. In scalar context the function returns 0 for success and the output of the command on error. In array context the function always return a list containing the return value of the command and the output of the command.

@param string - command

@return success - 0 @return error - error string @returnlist success - (0, output) @returnlist error - (return value of command, output)

AUTHOR ^

AMD OSRC Tapper Team <tapper@amd64.org>

COPYRIGHT AND LICENSE ^

This software is Copyright (c) 2012 by Advanced Micro Devices, Inc..

This is free software, licensed under:

  The (two-clause) FreeBSD License
syntax highlighting: