Hook::Modular::Cache::Null - Null cache


Hook-Modular documentation Contained in the Hook-Modular distribution.

Index


Code Index:

NAME

Top

Hook::Modular::Cache::Null - Null cache

VERSION

Top

version 1.101050

DESCRIPTION

Top

This class implements a basic, hash-based cache.

METHODS

Top

new

This is a basic constructor; it doesn't take any arguments.

get

Takes a key argument and returns the value stored for this hash key.

set

Takes a key and a value and sets that hash key to that value.

remove

Takes a key argument and deletes the hash entry for this key.

INSTALLATION

Top

See perlmodinstall for information and options on installing Perl modules.

BUGS AND LIMITATIONS

Top

No bugs have been reported.

Please report any bugs or feature requests through the web interface at http://rt.cpan.org/Public/Dist/Display.html?Name=Hook-Modular.

AVAILABILITY

Top

The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit http://www.perl.com/CPAN/ to find a CPAN site near you, or see http://search.cpan.org/dist/Hook-Modular/.

The development version lives at http://github.com/hanekomu/Hook-Modular/. Instead of sending patches, please fork this project using the standard git and github infrastructure.

AUTHORS

Top

  Marcel Gruenauer <marcel@cpan.org>
  Tatsuhiko Miyagawa <miyagawa@bulknews.net>

COPYRIGHT AND LICENSE

Top


Hook-Modular documentation Contained in the Hook-Modular distribution.

use 5.008;
use strict;
use warnings;

package Hook::Modular::Cache::Null;
BEGIN {
  $Hook::Modular::Cache::Null::VERSION = '1.101050';
}
# ABSTRACT: Null cache

sub new {
    bless {}, shift;
}

sub get {
    my ($self, $key) = @_;
    $self->{$key};
}

sub set {
    my ($self, $key, $value) = @_;
    $self->{$key} = $value;
}

sub remove {
    my ($self, $key) = @_;
    delete $self->{$key};
}
1;


__END__