summaryrefslogtreecommitdiff
path: root/bin/raps2
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-07-04 09:37:36 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-07-04 09:37:36 +0200
commite496f621262e74133d9870cc197217552ad10185 (patch)
tree53ed5eee5fa1548588f6f9f4a449756db53ddd69 /bin/raps2
parent2db2afec688b8b44ddeca55cd8226c1db923b17f (diff)
Raps2.pm: Make file_to_hash return a hashref (consistency with pw_load)
Diffstat (limited to 'bin/raps2')
-rwxr-xr-xbin/raps210
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/raps2 b/bin/raps2
index e05a7d5..689ecd2 100755
--- a/bin/raps2
+++ b/bin/raps2
@@ -141,8 +141,8 @@ sub cmd_info {
exit 2;
}
- my %key = $raps2->file_to_hash($pwfile);
- $raps2->ui->output( [ 'URL', $key{url} ], [ 'Login', $key{login} ], );
+ my $key = $raps2->file_to_hash($pwfile);
+ $raps2->ui->output( [ 'URL', $key->{url} ], [ 'Login', $key->{login} ], );
return;
}
@@ -151,11 +151,11 @@ sub cmd_list {
my @files = read_dir( data_home('raps2') );
for my $file ( sort @files ) {
- my %key = $raps2->file_to_hash( data_files("raps2/${file}") );
+ my $key = $raps2->file_to_hash( data_files("raps2/${file}") );
$raps2->ui->list(
[ 'Account', $file ],
- [ 'Login', $key{login} ],
- [ 'URL', $key{url} ],
+ [ 'Login', $key->{login} ],
+ [ 'URL', $key->{url} ],
);
}