From: Marius Gavrilescu Date: Sun, 12 Apr 2015 14:27:53 +0000 (+0300) Subject: Make add_names return undef when called on undef X-Git-Tag: 5999.000_014~28 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=ee00be0c0c68005cc06f4cd266496d7445172533;p=gruntmaster-data.git Make add_names return undef when called on undef --- 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 {