>> +    # tricky xpath
>> +    # @ means we filter the result query based on a the value of an item 
>> attribute ( @ = attribute)
>> +    # @ needs to be escaped to prevent Perl double quote interpolation
>> +    my $xpath_find_fileref = sprintf("/ovf:Envelope/ovf:DiskSection/\
>> +ovf:Disk[\@ovf:diskId='%s']/\@ovf:fileRef", $disk_id);
> 
> Is there a particular reason for using sprintf instead of an
> interpolated string (same for the rest below)? 

Readability ? The xpath query is already quite a character soup, and
I did not want to the next person to read this to miss the variable
interpolation.

I'll send soonish a V5 with all the other suggestions.

Emmanuel



_______________________________________________
pve-devel mailing list
[email protected]
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to