26 Apr 2006 21:38:02 UTC
- Distribution: Spread-Message
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (0 / 32 / 0)
- KwaliteeBus factor: 0
- 50.00% Coverage
- License: unknown
- Activity24 month
- Download (23.74KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionMARKPF Mark Pfeiffer
Utils - A general set of perl functions to be included
Utils is used for aquiring locks, date functions and error reporting.
Following are a set of utility functions that are used often in the genloader code. Each function or set of functions is described below.
It is used by the examples OK!
Variables Defined and exported are: $Program_Name = the basename of the program running $Command = the complete command use to run proggy
Subroutine getlock Args: $file to use as lock file Rtns: true/false create a lock file for application synchronisation in an atomic manner.
Subroutine read_config_file Args: config file to read in Rtns: nothing but sets variables in the Settings:: package Description: Read in the config file and set all the variables into the Settings:: package. An example config file is: $hosts = ['x', 'a', 'b' ];
Subroutine forkit Args: none Rtns: none Description: forks into daemon mode or dies on error.
Subroutine clone Args: none Rtns: none Description: forks and execs another child process that looks just like us :-). Parent isn't affected
Subroutine log Args: the message to print Rtns: none Description: prints a formatted response to stdout with time stamp added. This could easily be extended to other things
Mark Pfeiffer <email@example.com>
Copyright (c) 2003 Mark Pfeiffer. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Spread::Message, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Spread::Message
For more information on module installation, please visit the detailed CPAN module installation guide.