sub all_pl_files { my ($self, @dirs) = @_; @dirs = @dirs ? @dirs : _pl_starting_points(); my @pl; for my $file ( $self->_find_files(@dirs) ) { if ( $file =~ /\.p(?:l|sgi)$/i ) { # Files with .pl or .psgi extensions are perl scripts push @pl, $file; } elsif ( $file =~ /(?:^[^.]+$)/ ) { # Files with no extension, but a perl shebang are perl scripts my $shebang = $self->_read_shebang($file); if ( $shebang =~ m/perl/ ) { push @pl, $file; } } } return @pl; }