diff options
| author | Mantas Mikulėnas <grawity@gmail.com> | 2022-07-09 00:03:26 +0300 |
|---|---|---|
| committer | Mantas Mikulėnas <grawity@gmail.com> | 2022-07-09 00:03:26 +0300 |
| commit | 2a2fd5afb5f9eba93fde2e7cedb949ab50baf8fb (patch) | |
| tree | 73cac4af7b48d361a2af55ba3e529a3e34b9e810 | |
| parent | 7eafc54f886581b85708d4a16c5fe9d28bb2e7be (diff) | |
sort imports
| -rwxr-xr-x | treeify | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -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}; } |
