The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Supervisor::Utils - Usefull utility routines for the Supervisor

SYNOPSIS

 use Supervisor::Class
   version => '0.01',
   base    => 'Supervisor::Base',
   utils   => 'env_store',
 ;

DESCRIPTION

This module provides a set of basic utilities that don't depend on a blessed object to function. These utilites currently only provide functions to manipulate the global $ENV variable.

METHODS

env_store

Remove all items from the $ENV variable and store them in a hash variable.

Example: my $env = env_store();

env_restore

Remove all items from $ENV variable and restore it back to a saved hash variable.

Example: env_restore($env);

env_create

Store all the items from a hash variable into the $ENV varable.

Example: env_create($env);

env_parse

Take a formated string and parse it into a hash variable. The string must have this format: "item=value;;item2=value2";

Example: my $string = "item=value;;item2=value2"; my $env = env_parse($string); env_create($env);

env_dump

Take the items from the current $ENV variable and create a formated string.

Example: my $string = env_dump(); my $env = env_create($string);

EXPORTS

 env_restore() 
 env_create() 
 env_parse() 
 env_dump()
 env_store()

SEE ALSO

 Badger::Utils

 Supervisor
 Supervisor::Base
 Supervisor::Class
 Supervisor::Constants
 Supervisor::Controller
 Supervisor::Log
 Supervisor::Process
 Supervisor::ProcessFactory
 Supervisor::Session
 Supervisor::Utils
 Supervisor::RPC::Server
 Supervisor::RPC::Client

AUTHOR

Kevin L. Esteb, <kesteb@wsipc.org>

COPYRIGHT AND LICENSE

Copyright (C) 2009 by Kevin L. Esteb

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.