File: Storable.pm

package info (click to toggle)
libchi-perl 0.61-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 696 kB
  • sloc: perl: 5,409; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 462 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Default serializer class, so that we don't have to depend on Data::Serializer.
# Recommend Data::Serializer for other serializers, rather than reinventing the wheel.
#
package CHI::Serializer::Storable;
$CHI::Serializer::Storable::VERSION = '0.61';
use Moo;
use Storable;
use strict;
use warnings;

sub serialize {
    return Storable::nfreeze( $_[1] );
}

sub deserialize {
    return Storable::thaw( $_[1] );
}

sub serializer {
    return 'Storable';
}

1;