File: Info.pm

package info (click to toggle)
libchi-memoize-perl 0.07-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 168 kB
  • sloc: perl: 279; makefile: 2
file content (71 lines) | stat: -rw-r--r-- 1,173 bytes parent folder | download | duplicates (2)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package CHI::Memoize::Info;
$CHI::Memoize::Info::VERSION = '0.07';
use Moo;
use strict;
use warnings;

has [ 'orig', 'wrapper', 'cache', 'key_prefix' ] => ( is => 'ro' );

1;

__END__

=pod

=head1 NAME

CHI::Memoize::Info - Information about a memoized function

=head1 VERSION

version 0.07

=head1 SYNOPSIS

    use CHI::Memoize qw(:all);
    memoize('func');

    # then

    my $info = memoized('func');
    
    # The CHI cache where memoize results are stored
    #
    my $cache = $info->cache;
    $cache->clear;

    # The original function, and the new wrapped function
    #
    my $orig = $info->orig;
    my $wrapped = $info->wrapped;

=head1 METHODS

=over

=item cache

The CHI cache where memoize results are stored for this function

=item orig

The original code reference when C<memoize> was called

=item wrapped

The wrapped code reference that C<memoize> created

=back

=head1 AUTHOR

Jonathan Swartz <swartz@pobox.com>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Jonathan Swartz.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut