/usr/share/perl5/Catalyst/Plugin/Cache/Backend/FastMmap.pm is in libcatalyst-plugin-cache-store-fastmmap-perl 0.02-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #!/usr/bin/perl
package Catalyst::Plugin::Cache::Backend::FastMmap;
use base qw/Cache::FastMmap/;
use strict;
use warnings;
# wrap everything in a scalar ref so that we can store plain scalars as well
sub get {
my ( $self, $key ) = @_;
${ $self->SUPER::get($key) || return };
}
sub set {
my ( $self, $key, $value ) = @_;
$self->SUPER::set( $key => \$value );
}
__PACKAGE__;
__END__
=pod
=head1 NAME
Catalyst::Plugin::Cache::Backend::FastMmap - A thin wrapper for
L<Cache::FastMmap> that can handle non refs.
=head1 SYNOPSIS
use Catalyst::Plugin::Cache::Backend::FastMmap;
my $cache_obj = Catalyst::Plugin::Cache::Backend::FastMmap->new;
$cache_obj->set( key => [qw/blah blah blah/] );
$cache_obj->set( key => "this_works_too" ); # non references can also be stored
=head1 DESCRIPTION
=cut
|