]>
git.proxmox.com Git - pve-client.git/blob - extractapi.pl
10 sub remove_code_refs
{
13 my $class = ref($tree);
16 if ($class eq 'ARRAY') {
17 foreach my $el (@$tree) {
18 remove_code_refs
($el);
20 } elsif ($class eq 'HASH') {
21 foreach my $k (keys %$tree) {
22 if (my $itemclass = ref($tree->{$k})) {
23 if ($itemclass eq 'CODE') {
25 } elsif ($itemclass eq 'Regexp') {
26 $tree->{$k} = "$tree"; # return string representation
28 remove_code_refs
($tree->{$k});
38 children
=> PVE
::RESTHandler
::api_dump
('PVE::API2', undef, 1),
40 GET
=> PVE
::API2-
>map_method_by_name('index'),
44 remove_code_refs
($root);
45 Storable
::store_fd
($root, \
*STDOUT
);