diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2015-03-19 23:26:31 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-03-20 05:50:30 +0100 |
commit | d4fd94584ce239e72fc68beac2be4bb9398dac92 (patch) | |
tree | 48fab1e80430b7f5102198c4740e33286a31bede | |
parent | e1d324e345f431e3552dbca32d3c448bea873f8b (diff) |
Try to avoid useless imports
Use 'require' not 'use' to speed up the exection of some commands.
-rwxr-xr-x | icevault | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -304,9 +304,9 @@ sub saveIdentityFile($$) { error "C<%s> exited with value %d", $CONFIG{gpg}, ($? >> 8) if $? and $? != -1; $outfh->close; - my $parent_dir = $filename =~ s/\/[^\/]+$//r; - File::Path::make_path $parent_dir unless -d $parent_dir; # create parent directories recursively - File::Copy::move $outfh->filename, $filename or error "Can't move C<%s>: %s", $outfh->filename, $!; + my $parent_dir = $file =~ s/\/[^\/]+$//r; + File::Path::make_path($parent_dir) unless -d $parent_dir; # create parent directories recursively + File::Copy::move($outfh->filename, $file) or error "Can't move C<%s>: %s", $outfh->filename, $!; # TODO: git add $filename; git commit } @@ -768,7 +768,7 @@ elsif ($command eq 'edit') { error "C<%s> exited with value %d", $CONFIG{gpg}, ($? >> 8) if $? and $? != -1; $outfh->close; - File::Copy::move $outfh->filename, $filename or error "Can't move C<%s>: %s", $outfh->filename, $!; + File::Copy::move($outfh->filename, $file) or error "Can't move C<%s>: %s", $outfh->filename, $!; } close $NULL; |