Skip to content

Commit

Permalink
Simplestore: save: use lexical loop variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Friesel committed Jul 12, 2009
1 parent 4995165 commit 3638390
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Simplestore.pm
Expand Up @@ -34,9 +34,8 @@ sub load {

sub save {
my ($file, $store) = @_;
my $key;
open(my $handle, '>', $file) or confess("Cannot open $file: $!");
foreach $key (keys(%$store)) {
foreach my $key (keys(%$store)) {
if ($key !~ /^\w+$/) {
confess("Invalid key name: May only contain alphanumeric and _");
}
Expand Down

0 comments on commit 3638390

Please sign in to comment.