summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-03-31 17:25:08 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-03-31 17:25:08 +0200
commit3fb82b837ec0b467c18cc0d6ba7bebafee35af41 (patch)
treed3b47f1605a1c95aaa06afcd905a52c0b6391766
parente1af93bfd7a551089be04d31ab1500f8cf88c766 (diff)
Allow . in a key name as well
-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";