X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=blobdiff_plain;f=src%2FPVE%2FINotify.pm;h=b2a580294a9195d8fb313950186a345a4f32b1c2;hp=44d0f2f91941931ac0a1fb5cdec9d767f2b341f1;hb=c8e94d4bb5bf75eca15311960e00f8683ca2dc5c;hpb=affde347f1fd4db7ef50c8b53f834e9785cd4d77 diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index 44d0f2f..b2a5802 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -15,7 +15,7 @@ use PVE::SafeSyslog; use PVE::Exception qw(raise_param_exc); use PVE::Tools; use PVE::ProcFSTools; -use Storable qw(dclone); +use Clone qw(clone); use Linux::Inotify2; use base 'Exporter'; use JSON; @@ -247,7 +247,7 @@ sub read_file { my $ret; if (!$noclone && ref ($ccinfo->{data})) { - $ret->{data} = dclone ($ccinfo->{data}); + $ret->{data} = clone ($ccinfo->{data}); } else { $ret->{data} = $ccinfo->{data}; } @@ -269,7 +269,7 @@ sub read_file { } # we cache data with references, so we always need to - # dclone this data. Else the original data may get + # clone this data. Else the original data may get # modified. $ccinfo->{data} = $res; @@ -278,7 +278,7 @@ sub read_file { my $ret; if (!$noclone && ref ($ccinfo->{data})) { - $ret->{data} = dclone ($ccinfo->{data}); + $ret->{data} = clone ($ccinfo->{data}); } else { $ret->{data} = $ccinfo->{data}; } @@ -1054,7 +1054,7 @@ sub __interface_to_string { # not printing out options } elsif ($d->{type} eq 'bridge') { - $d->{bridge_ports} =~ s/([;,\s])+/ /g; + $d->{bridge_ports} =~ s/[;,\s]+/ /g; my $ports = $d->{bridge_ports} || 'none'; $raw .= "\tbridge_ports $ports\n"; $done->{bridge_ports} = 1; @@ -1074,7 +1074,7 @@ sub __interface_to_string { } elsif ($d->{type} eq 'bond') { - $d->{slaves} =~ s/([;,\s])+/ /g; + $d->{slaves} =~ s/[;,\s]+/ /g; my $slaves = $d->{slaves} || 'none'; $raw .= "\tslaves $slaves\n"; $done->{slaves} = 1;