aboutsummaryrefslogtreecommitdiff
path: root/sbofind
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-11-14 04:04:34 +0100
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-11-14 04:04:34 +0100
commit12ab108ac9be2fd27700ca2f92b2a73f04ac4803 (patch)
treed039751c0d102b467dd5c59a5047867a9e28c2e6 /sbofind
parenteaa18fd91c51c136ff6ec607d46d32b87a2ea34f (diff)
downloadsbotools2-12ab108ac9be2fd27700ca2f92b2a73f04ac4803.tar.xz
Additional Perl::Critic::Freenode fixes, and one missed prototype
Diffstat (limited to 'sbofind')
-rwxr-xr-xsbofind5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbofind b/sbofind
index 958545b..c37c464 100755
--- a/sbofind
+++ b/sbofind
@@ -93,7 +93,7 @@ sub get_file_contents {
my ($fh, $exit) = open_read(shift);
if ($exit) {
warn $fh;
- return;
+ return();
}
my $contents = do {local $/; <$fh>};
for ($contents) {
@@ -115,7 +115,8 @@ my $findings = perform_search($search);
# pretty formatting
if (exists $$findings[0]) {
for my $hash (@$findings) {
- while (my ($key, $val) = each %$hash) {
+ for my $key (keys %$hash) {
+ my $val = $hash->{$key};
say "SBo: $key";
say "Path: $val";
say "info: ". get_file_contents("$val/$key.info") if $show_info;