NAME
XAS::Lib::Mixin::Env - Routines to manipulate the environment variables
SYNOPSIS
use XAS::Class
version => '0.01',
base => 'XAS::Base',
mixins => 'XAS::Lib::Mixin::Env',
;
DESCRIPTION
This module provides a set of routines 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
AUTHOR
Kevin L. Esteb, <kevin@kesteb.us>
COPYRIGHT AND LICENSE
Copyright (C) 2013 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.8 or, at your option, any later version of Perl 5 you may have available.