mirror of
https://github.com/TheGrandWazoo/freenas-proxmox.git
synced 2026-10-18 22:46:39 +02:00
fix: use bare return instead of return undef (perlcritic)
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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
59d8a8100f
commit
a47346161b
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user