This is a way too long chain of indirections. It would be clearer if this method were invoked:

```perl
$self->nodefiles($confighash->{nodefiles});
```
and then this block would become

```perl
sub nodefiles {
    my ($self, $nodefiles) = @_;
    foreach my $file (sort(keys(%$nodefiles))) {
       if ($nodefiles->{$file}->{contents}) {
```