[pve-devel] r5049 - pve-common/trunk

svn-commits at proxmox.com svn-commits at proxmox.com
Tue Aug 24 13:47:34 CEST 2010


Author: dietmar
Date: 2010-08-24 11:47:34 +0000 (Tue, 24 Aug 2010)
New Revision: 5049

Modified:
   pve-common/trunk/RPCEnvironment.pm
Log:


Modified: pve-common/trunk/RPCEnvironment.pm
===================================================================
--- pve-common/trunk/RPCEnvironment.pm	2010-08-24 11:44:57 UTC (rev 5048)
+++ pve-common/trunk/RPCEnvironment.pm	2010-08-24 11:47:34 UTC (rev 5049)
@@ -3,9 +3,17 @@
 use strict;
 use warnings;
 
-# we use this global to pass RPC related environment value
-our $pve_env;
+# we use this singleton class to pass RPC related environment value
 
+my $pve_env;
+
+sub get {
+
+    die "not initialized" if !$pve_env;
+
+    return $pve_env;
+}
+
 sub init {
     my ($class, $type) = @_;
 




More information about the pve-devel mailing list