[pve-devel] [PATCH v5 manager 1/2] vzdump: move remaining guest include logic to single method

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Jun 8 15:03:52 CEST 2020


On 6/8/20 1:55 PM, Aaron Lauterer wrote:
>>
>> $vmids = [ grep { !$excludehash->{$_} } sort keys $vmlist->{ids}->%* ];
>>
>> but no hard feeling here.
> 
> I agree on the early sorting, but I am not sure about that oneliner. It's not as easy to comprehend what's going on for someone who isn't used to this kind of syntax already.

I mean, yes it uses some slightly more advanced things but due to the variable
names and keywords involved it should be somewhat clear that vmids are sorted
and filtered by the $excludehash.
So for people which lack that perl understanding required, the basic semantic
could be derived from context and for others it makes it quicker to read what's
actually being done as it's quite concise - at least for me.

Still, no hard feelings and I'm probably a bit biased here ;-)





More information about the pve-devel mailing list