From ee00be0c0c68005cc06f4cd266496d7445172533 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sun, 12 Apr 2015 17:27:53 +0300 Subject: [PATCH] Make add_names return undef when called on undef --- lib/Gruntmaster/Data.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Gruntmaster/Data.pm b/lib/Gruntmaster/Data.pm index 4393a62..7b68079 100644 --- a/lib/Gruntmaster/Data.pm +++ b/lib/Gruntmaster/Data.pm @@ -75,6 +75,7 @@ sub object_name { sub add_names ($) { ## no critic (ProhibitSubroutinePrototypes) my ($el) = @_; + return unless defined $el; if (ref $el eq 'ARRAY') { &add_names ($_) for @$el ## no critic (ProhibitAmpersandSigils) } else { -- 2.39.2