[pve-devel] r5112 - pve-common/trunk
svn-commits at proxmox.com
svn-commits at proxmox.com
Fri Sep 10 14:09:57 CEST 2010
Author: dietmar
Date: 2010-09-10 12:09:56 +0000 (Fri, 10 Sep 2010)
New Revision: 5112
Modified:
pve-common/trunk/ChangeLog
pve-common/trunk/Tools.pm
Log:
Modified: pve-common/trunk/ChangeLog
===================================================================
--- pve-common/trunk/ChangeLog 2010-09-10 12:01:44 UTC (rev 5111)
+++ pve-common/trunk/ChangeLog 2010-09-10 12:09:56 UTC (rev 5112)
@@ -1,5 +1,7 @@
2010-09-10 Proxmox Support Team <support at proxmox.com>
+ * Tools.pm (extract_param): new helper
+
* CLIHandler.pm: new verbose option for help.
* Tools.pm (kvmkeymaps): moved from PVE::Utils.
Modified: pve-common/trunk/Tools.pm
===================================================================
--- pve-common/trunk/Tools.pm 2010-09-10 12:01:44 UTC (rev 5111)
+++ pve-common/trunk/Tools.pm 2010-09-10 12:09:56 UTC (rev 5112)
@@ -17,6 +17,7 @@
split_list
safe_print
trim
+extract_param
);
# flock: we use one file handle per process, so lock file
@@ -388,4 +389,13 @@
};
}
+sub extract_param {
+ my ($param, $key) = @_;
+
+ my $res = $param->{$key};
+ delete $param->{$key};
+
+ return $res;
+}
+
1;
More information about the pve-devel
mailing list