summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMantas Mikulėnas <grawity@gmail.com>2022-07-09 00:03:26 +0300
committerMantas Mikulėnas <grawity@gmail.com>2022-07-09 00:03:26 +0300
commit2a2fd5afb5f9eba93fde2e7cedb949ab50baf8fb (patch)
tree73cac4af7b48d361a2af55ba3e529a3e34b9e810
parent7eafc54f886581b85708d4a16c5fe9d28bb2e7be (diff)
sort imports
-rwxr-xr-xtreeify12
1 files changed, 5 insertions, 7 deletions
diff --git a/treeify b/treeify
index 046f00e..9fc10b7 100755
--- a/treeify
+++ b/treeify
@@ -5,12 +5,9 @@
use v5.10;
use warnings;
use strict;
-use Getopt::Long qw(:config bundling no_ignore_case);
+use constant { true => 1, false => 0 };
use File::Spec;
-use constant {
- true => 1,
- false => 0,
-};
+use Getopt::Long qw(:config bundling no_ignore_case);
my %GRAPH = (
# tree
@@ -57,7 +54,7 @@ sub color {
}
sub canonpath {
- my $path = shift;
+ my ($path) = @_;
if ($opt{separator} ne "/") {
return $path;
} elsif ($path =~ m|^(\./)|) {
@@ -68,7 +65,8 @@ sub canonpath {
}
sub split_path {
- my $path = canonpath(shift);
+ my ($path) = @_;
+ $path = canonpath($path);
my @path;
for (split(/\Q$opt{separator}\E+/, $path)) {
if ($_ eq "") { push @path, $opt{separator}; }