From 202c4ef28cc7a3dbcba02fdfdba3b9526146e4d5 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 29 Apr 2021 19:00:29 -0400 Subject: [PATCH] copy array_diff sub into Object so we don't have the dependency --- scripts/ZoneMinder/lib/ZoneMinder/Object.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Object.pm b/scripts/ZoneMinder/lib/ZoneMinder/Object.pm index 084e9a1e6..f3d750338 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Object.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Object.pm @@ -22,6 +22,12 @@ # This module contains the common definitions and functions used by the rest # of the ZoneMinder scripts # + +sub array_diff(\@\@) { + my %e = map { $_ => undef } @{$_[1]}; + return @{[ ( grep { (exists $e{$_}) ? ( delete $e{$_} ) : ( 1 ) } @{ $_[0] } ), keys %e ] }; +} + package ZoneMinder::Object; use 5.006; @@ -29,7 +35,6 @@ use strict; use warnings; use Time::HiRes qw{ gettimeofday tv_interval }; use Carp qw( cluck ); -use Array::Utils qw(:all); require ZoneMinder::Base;