Skip Menu |

This queue is for tickets about the Sys-Virt CPAN distribution.

Report information
The Basics
Id: 50761
Status: rejected
Priority: 0/
Queue: Sys-Virt

People
Owner: Nobody in particular
Requestors: dean [...] fragfest.com.au
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: API change request
This api of my $dom = $vmm->create_domain($xml); where $xml is an xml blob seems very un perl like please replace or additionally allow a hash, which is the perly way of doing things and its much less messy to program. ie my $dom = $vmm->create_domain(var1 => 'blah', array1 => [(1,2,3,4)]); or maybe a hashref my %config = (var1 => 'blah', array1 => [(1,2,3,4)]); my $dom = $vmm->create_domain(\%config); thanks!
The libvirt API uses XML as a flexible, extensible format for describing objects. This way libvirt can introduce new XML elements and attributes without apps needing to know about them. Sys::Virt's goal is to provide a direct binding to underlying libvirt APIs. If someone wants to write a higher level API that represents libvirt objects as full perl data structures with data accessors, and APIs to serialize to & from XML, this is a job for a separate CPAN add-on module, not Sys::Virt itself.