]> git.proxmox.com Git - pve-common.git/commitdiff
RESTHandler: define empty DESTROY to avoid useless warings
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 31 Dec 2014 16:11:28 +0000 (17:11 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 31 Dec 2014 16:11:28 +0000 (17:11 +0100)
We oserverd the following warning sometimes:

  (in cleanup) no such method 'main=HASH(0x38b2d48)::DESTROY'

Defining an empty DESTROY seems to avoid it.

data/PVE/RESTHandler.pm

index 23a29ea73a5ac2de249102193c3c1522de19fdef..41531925fe1ab7cc0be9f190494ec28e00739598 100644 (file)
@@ -265,6 +265,8 @@ sub register_page_formatter {
     $info->{formatter}->{$format} = $code;
 }
 
     $info->{formatter}->{$format} = $code;
 }
 
+sub DESTROY {}; # avoid problems with autoload
+
 sub AUTOLOAD {
     my ($this) = @_;
 
 sub AUTOLOAD {
     my ($this) = @_;