summaryrefslogtreecommitdiffstats
path: root/lib/KiokuDB/Serializer/Crypt.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/KiokuDB/Serializer/Crypt.pm')
-rw-r--r--lib/KiokuDB/Serializer/Crypt.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/KiokuDB/Serializer/Crypt.pm b/lib/KiokuDB/Serializer/Crypt.pm
index 9b52e5a..0eadbd1 100644
--- a/lib/KiokuDB/Serializer/Crypt.pm
+++ b/lib/KiokuDB/Serializer/Crypt.pm
@@ -37,9 +37,12 @@ C<default_key> in L<Crypt::Util>.
=cut
has crypt_key => (
- is => 'ro',
- isa => 'Str',
- required => 1,
+ is => 'ro',
+ isa => 'Str',
+ default => sub {
+ confess "The 'crypt_key' attribute for " . blessed($self)
+ . " is required if the 'crypt' attribute is not given";
+ },
);
=attr crypt_cipher