summaryrefslogtreecommitdiff
path: root/lib/Simplestore.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Simplestore.pm')
-rw-r--r--lib/Simplestore.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Simplestore.pm b/lib/Simplestore.pm
index 42d5569..e9624dd 100644
--- a/lib/Simplestore.pm
+++ b/lib/Simplestore.pm
@@ -40,8 +40,8 @@ sub save {
open(my $handle, '>', $file) or confess("Cannot open $file for writing: $!");
foreach my $key (keys(%{$store})) {
- if ($key !~ / ^ \w+ $ /x) {
- confess("Invalid key name: May only contain alphanumeric and _");
+ if ($key !~ / ^ [\w.]+ $ /x) {
+ confess("Invalid key name: $key: May only contain [\\w.]");
}
foreach (split(/\n/, $store->{$key})) {
print $handle "$key\t$_\n";