From fdedc8aca276ba1362d6a099374d35b0f914463f Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 4 Oct 2023 09:15:40 +0100 Subject: [PATCH] Only require UUID package if used. It is not always installed. --- perllib/FixMyStreet/Roles/CobrandEcho.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perllib/FixMyStreet/Roles/CobrandEcho.pm b/perllib/FixMyStreet/Roles/CobrandEcho.pm index acb3db1f5cd..6017e6f5401 100644 --- a/perllib/FixMyStreet/Roles/CobrandEcho.pm +++ b/perllib/FixMyStreet/Roles/CobrandEcho.pm @@ -6,7 +6,6 @@ use DateTime; use DateTime::Format::Strptime; use Moo::Role; use Sort::Key::Natural qw(natkeysort_inplace); -use UUID::Tiny ':std'; use FixMyStreet::DateRange; use FixMyStreet::WorkingDays; use Open311::GetServiceRequestUpdates; @@ -659,7 +658,8 @@ sub find_available_bulky_slots { my $guid_key = $self->council_url . ":echo:bulky_event_guid:" . $property->{id}; my $guid = $self->{c}->session->{$guid_key}; unless ($guid) { - $self->{c}->session->{$guid_key} = $guid = UUID::Tiny::create_uuid_as_string; + require UUID::Tiny; + $self->{c}->session->{$guid_key} = $guid = UUID::Tiny::create_uuid_as_string(); } my $window = $self->_bulky_collection_window($last_earlier_date_str);