GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  REX::CONFIG (3)

.ds Aq ’

NAME

Rex::Config - Handles the configuration.

CONTENTS

DESCRIPTION

This module holds all configuration parameters for Rex.

With this module you can specify own configuration parameters for your modules.

EXPORTED METHODS

register_set_handler($handler_name, CW$code)

Register a handler that gets called by set.



 Rex::Config->register_set_handler("foo", sub {
   my ($value) = @_;
   print "The user set foo -> $value\n";
 });



And now you can use this handler in your Rexfile like this:



 set foo => "bar";



register_config_handler($topic, CW$code)

With this function it is possible to register own sections in the users config file ($HOME/.rex/config.yml).

Example:



 Rex::Config->register_config_handler("foo", sub {
  my ($param) = @_;
  print "bar is: " . $param->{bar} . "\n";
 });



And now the user can set this in his configuration file:



 base:
   user: theuser
   password: thepassw0rd
 foo:
   bar: baz



Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 REX::CONFIG (3) 2016-03-07

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.