Am 17.11.2016 um 07:20 schrieb Dietmar Maurer: >> While blessing it is good practise to provide the class. This makes it also >> possible to use >> QemuServer as a base / parent class. > > Why do you want another class (QemuServer) as base?
We've a custom class PHQemuServer which has VZDump/QemuServer as a base class as we're doing backups in some different way. That's a private use case but it's common to use it this way and add the class to the bless. See also: http://modernperlbooks.com/books/modern_perl/chapter_07.html#Ymxlc3NlZF9yZWZlcmVuY2Vz > Isn't it better to remove that whole $class parameter? > > sub new { > my ($vzdump) = @_; This would result in the need to call VZDUmp::QemuServer::new(..); never saw that before for creating objects ;-) Stefan _______________________________________________ pve-devel mailing list [email protected] http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
