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::SHARED::VAR (3)

.ds Aq ’

NAME

Rex::Shared::Var - Share variables across Rex tasks

CONTENTS

DESCRIPTION

Share variables across Rex tasks with the help of Storable, using a vars.db.$PID file in the local directory, where $PID is the PID of the parent process.

SYNOPSIS



 BEGIN {                           # put share in a BEGIN block
   use Rex::Shared::Var;
   share qw($scalar @array %hash); # share the listed variables
 }



METHODS

    share

Share the passed list of variables across Rex tasks. Should be used in a BEGIN block.



 BEGIN {
   use Rex::Shared::Var;
   share qw($error_count);
 }

 task count, sub {
   $error_count += run wc -l /var/log/syslog;
 };

 after_task_finished count, sub {
   say "Total number of errors: $error_count";
 };



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


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

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