On Wed Apr 2, 2025 at 12:44 PM CEST, Thomas Lamprecht wrote: > Am 02.04.25 um 12:01 schrieb Max Carrara: > >> + use base qw(PVE::BackupProvider::Plugin::Base); > > You can `use parent ...` here, as that's more lightweight. `base` is > > fine too though. > > > > See: https://perldoc.perl.org/parent > > > > Only difference is that `use parent ...` doesn't support the `fields` > > pragma, but that doesn't apply here anyway :P > > Please don't, let's stop deviate from a widely used pattern without any > real benefit, i.e. let's not do churn/refactoring for the sake of itself. > > I.e.: > > # rg -o '^\s*use baSE' /usr/share/perl5/PVE/ /usr/share/perl5/Proxmox/ | wc -l > 0 > > # rg -o '^\s*use base' /usr/share/perl5/PVE/ /usr/share/perl5/Proxmox/ | wc -l > 259 > > If it really has some benefit then lets move the whole code base > over to avoid a mix. And that would then be best done by creating > a transformation like a sed invocation, or if needed, a more semantic > patch like Coccinelle, and let a maintainer with broad push access > apply that directly. > Until then lets keep one of the few things where we actually managed > to just use a single consistent style consistent...
ACK! Fair point. > > > Am 02.04.25 um 12:01 schrieb Max Carrara: > > Not sure if we actually want to enforce this though; alternatively, we > > could let some kind of dev tooling check for "conformance" like that. It > > can quickly get too messy otherwise [rfc]. > > > > [rfc]: > > https://lore.proxmox.com/pve-devel/20250130145124.317745-1-m.carr...@proxmox.com/ > > Only very basic and most important things should be enforcement, > please no (over-engineered) code for things where one can just lose > anyway. Any more involved checks should happen as dev tooling. I.e., > some sort of test suite for this and also a similar one for storage > plugins – that probably can share a few building blocks – would be > much nicer and more helpful. In the long term that even could involve > to a conformance test suite, but I'd rather prefer starting out simple. Yeah I agree; I was mainly just mentioning this as an idea here. There are other things that need to be sorted out first anyways. :P _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel