Make add_names return undef when called on undef
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 12 Apr 2015 14:27:53 +0000 (17:27 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 12 Apr 2015 14:28:00 +0000 (17:28 +0300)
lib/Gruntmaster/Data.pm

index 4393a62de6f687d724f8cab874b7e190cfd31283..7b6807959ec522affbcbc156f48f0a92292159d7 100644 (file)
@@ -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 {
This page took 0.011185 seconds and 4 git commands to generate.