]> git.proxmox.com Git - pve-common.git/commit - src/PVE/RESTHandler.pm
add the possibility to use a hash for parameter mapping
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 15 Jun 2018 13:28:42 +0000 (15:28 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 19 Jun 2018 09:56:00 +0000 (11:56 +0200)
commita1c7eddaf198b1fb23255f0199c0624476a35606
tree52647e93d83ee1a5e25ced0aca9746c1e4201abf
parent305fc1e12a1482eed19fc65cbea1b78e4f79cf7d
add the possibility to use a hash for parameter mapping

instead of writing:
['name', sub {...}, 'description', 1]

one can now use:
{
    name => 'name',
    func => sub { ... },
    desc => 'desc',
    interactive => 1,
}

which makes it more obvious what is what
(and allows later patches to easily override some things)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/PVE/RESTHandler.pm