From a47346161bf20891a25666b7261ae27d896a42c3 Mon Sep 17 00:00:00 2001 From: Kevin Adams Date: Sun, 7 Jun 2026 14:14:53 -0400 Subject: [PATCH] fix: use bare return instead of return undef (perlcritic) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subroutines::ProhibitExplicitReturnUndef — volume_snapshot, volume_snapshot_delete, volume_snapshot_rollback all used return undef where bare return is the correct Perl idiom. Co-Authored-By: Claude Sonnet 4.6 --- perl5/PVE/Storage/Custom/TrueNAS.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perl5/PVE/Storage/Custom/TrueNAS.pm b/perl5/PVE/Storage/Custom/TrueNAS.pm index 2d68559..b594a56 100644 --- a/perl5/PVE/Storage/Custom/TrueNAS.pm +++ b/perl5/PVE/Storage/Custom/TrueNAS.pm @@ -726,7 +726,7 @@ sub volume_snapshot { my $dataset = _snap_dataset($scfg, $volname); _log('info', "snapshot: creating $dataset\@$snap"); _api($scfg, 'POST', '/zfs/snapshot', { dataset => $dataset, name => $snap }); - return undef; + return; } sub volume_snapshot_delete { @@ -739,7 +739,7 @@ sub volume_snapshot_delete { # The snapshot API requires full URI encoding of the id path segment — # unlike the dataset endpoint, it does not accept bare slashes in the path. _api($scfg, 'DELETE', "/zfs/snapshot/id/" . uri_escape($id)); - return undef; + return; } sub volume_snapshot_rollback { @@ -752,7 +752,7 @@ sub volume_snapshot_rollback { id => $id, options => { force => JSON::false, recursive_clones => JSON::false }, }); - return undef; + return; } # ZFS only permits rollback to the most recent snapshot. If $snap is not the