Codebase list libmason-plugin-cache-perl / da526628-b3fd-4b63-979c-ea7d491d40c9/main
[ Debian Janitor ] New upstream snapshot. Debian Janitor 2 years ago
14 changed file(s) with 120 addition(s) and 206 deletion(s). Raw diff Collapse all Expand all
0
10 This is the Perl distribution Mason-Plugin-Cache.
21
32 Installing Mason-Plugin-Cache is straightforward.
87
98 % cpanm Mason::Plugin::Cache
109
11 If you are installing into a system-wide directory, you may need to pass the
12 "-S" flag to cpanm, which uses sudo to install the module:
13
14 % cpanm -S Mason::Plugin::Cache
10 If it does not have permission to install modules to the current perl, cpanm
11 will automatically set up and install to a local::lib in your home directory.
12 See the local::lib documentation (https://metacpan.org/pod/local::lib) for
13 details on enabling it in your environment.
1514
1615 ## Installing with the CPAN shell
1716
2120
2221 ## Manual installation
2322
24 As a last resort, you can manually install it. Download the tarball, untar it,
25 then build it:
23 As a last resort, you can manually install it. If you have not already
24 downloaded the release tarball, you can find the download link on the module's
25 MetaCPAN page: https://metacpan.org/pod/Mason::Plugin::Cache
26
27 Untar the tarball, install configure prerequisites (see below), then build it:
2628
2729 % perl Makefile.PL
2830 % make && make test
3133
3234 % make install
3335
34 If you are installing into a system-wide directory, you may need to run:
36 On Windows platforms, you should use `dmake` or `nmake`, instead of `make`.
3537
36 % sudo make install
38 If your perl is system-managed, you can create a local::lib in your home
39 directory to install modules to. For details, see the local::lib documentation:
40 https://metacpan.org/pod/local::lib
41
42 The prerequisites of this distribution will also have to be installed manually. The
43 prerequisites are listed in one of the files: `MYMETA.yml` or `MYMETA.json` generated
44 by running the manual build process described above.
45
46 ## Configure Prerequisites
47
48 This distribution requires other modules to be installed before this
49 distribution's installer can be run. They can be found under the
50 "configure_requires" key of META.yml or the
51 "{prereqs}{configure}{requires}" key of META.json.
52
53 ## Other Prerequisites
54
55 This distribution may require additional modules to be installed after running
56 Makefile.PL.
57 Look for prerequisites in the following phases:
58
59 * to run make, PHASE = build
60 * to use the module code itself, PHASE = runtime
61 * to run tests, PHASE = test
62
63 They can all be found in the "PHASE_requires" key of MYMETA.yml or the
64 "{prereqs}{PHASE}{requires}" key of MYMETA.json.
3765
3866 ## Documentation
3967
4068 Mason-Plugin-Cache documentation is available as POD.
41 You can run perldoc from a shell to read the documentation:
69 You can run `perldoc` from a shell to read the documentation:
4270
4371 % perldoc Mason::Plugin::Cache
72
73 For more information on installing Perl modules via CPAN, please see:
74 https://www.cpan.org/modules/INSTALL.html
1717
1818 The GNU General Public License, Version 1, February 1989
1919
20 GNU GENERAL PUBLIC LICENSE
21 Version 1, February 1989
20 GNU GENERAL PUBLIC LICENSE
21 Version 1, February 1989
2222
2323 Copyright (C) 1989 Free Software Foundation, Inc.
24 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
24 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
2526 Everyone is permitted to copy and distribute verbatim copies
2627 of this license document, but changing it is not allowed.
2728
28 Preamble
29 Preamble
2930
3031 The license agreements of most software companies try to keep users
3132 at the mercy of those companies. By contrast, our General Public
6667 The precise terms and conditions for copying, distribution and
6768 modification follow.
6869
69 GNU GENERAL PUBLIC LICENSE
70 GNU GENERAL PUBLIC LICENSE
7071 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
7172
7273 0. This License Agreement applies to any program or other work which
184185 of preserving the free status of all derivatives of our free software and
185186 of promoting the sharing and reuse of software generally.
186187
187 NO WARRANTY
188 NO WARRANTY
188189
189190 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
190191 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
206207 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
207208 POSSIBILITY OF SUCH DAMAGES.
208209
209 END OF TERMS AND CONDITIONS
210
211 Appendix: How to Apply These Terms to Your New Programs
210 END OF TERMS AND CONDITIONS
211
212 Appendix: How to Apply These Terms to Your New Programs
212213
213214 If you develop a new program, and you want it to be of the greatest
214215 possible use to humanity, the best way to achieve this is to make it
234235 GNU General Public License for more details.
235236
236237 You should have received a copy of the GNU General Public License
237 along with this program; if not, write to the Free Software Foundation,
238 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
238 along with this program; if not, write to the Free Software
239 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
240
239241
240242 Also add information on how to contact you by electronic and paper mail.
241243
289291
290292 - "Package" refers to the collection of files distributed by the Copyright
291293 Holder, and derivatives of that collection of files created through
292 textual modification.
294 textual modification.
293295 - "Standard Version" refers to such a Package if it has not been modified,
294296 or has been modified in accordance with the wishes of the Copyright
295 Holder.
297 Holder.
296298 - "Copyright Holder" is whoever is named in the copyright or copyrights for
297 the package.
299 the package.
298300 - "You" is you, if you're thinking about copying or distributing this Package.
299301 - "Reasonable copying fee" is whatever you can justify on the basis of media
300302 cost, duplication charges, time of people involved, and so on. (You will
301303 not be required to justify it to the Copyright Holder, but only to the
302 computing community at large as a market that must bear the fee.)
304 computing community at large as a market that must bear the fee.)
303305 - "Freely Available" means that no fee is charged for the item itself, though
304306 there may be fees involved in handling the item. It also means that
305307 recipients of the item may redistribute it under the same conditions they
306 received it.
308 received it.
307309
308310 1. You may make and give away verbatim copies of the source form of the
309311 Standard Version of this Package without restriction, provided that you
370372
371373 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
372374 WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
373 MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
375 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
374376
375377 The End
376378
0 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.017.
01 Changes
12 INSTALL
23 LICENSE
33 "Jonathan Swartz <swartz@pobox.com>"
44 ],
55 "dynamic_config" : 0,
6 "generated_by" : "Dist::Zilla version 4.200008, CPAN::Meta::Converter version 2.113640",
6 "generated_by" : "Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010",
77 "license" : [
88 "perl_5"
99 ],
1010 "meta-spec" : {
1111 "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
12 "version" : "2"
12 "version" : 2
1313 },
1414 "name" : "Mason-Plugin-Cache",
1515 "no_index" : {
2020 "prereqs" : {
2121 "configure" : {
2222 "requires" : {
23 "ExtUtils::MakeMaker" : "6.30"
23 "ExtUtils::MakeMaker" : "0"
2424 }
2525 },
2626 "runtime" : {
2727 "requires" : {
28 "CHI" : 0,
28 "CHI" : "0",
2929 "Mason" : "2.09"
3030 }
3131 },
3232 "test" : {
3333 "requires" : {
34 "Test::Class::Most" : 0
34 "Test::Class::Most" : "0"
3535 }
3636 }
3737 },
4747 "web" : "https://github.com/jonswar/perl-mason-plugin-cache"
4848 }
4949 },
50 "version" : "0.05"
50 "version" : "0.05",
51 "x_generated_by_perl" : "v5.32.1",
52 "x_serialization_backend" : "Cpanel::JSON::XS version 4.26",
53 "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later"
5154 }
5255
22 author:
33 - 'Jonathan Swartz <swartz@pobox.com>'
44 build_requires:
5 Test::Class::Most: 0
5 Test::Class::Most: '0'
66 configure_requires:
7 ExtUtils::MakeMaker: 6.30
7 ExtUtils::MakeMaker: '0'
88 dynamic_config: 0
9 generated_by: 'Dist::Zilla version 4.200008, CPAN::Meta::Converter version 2.113640'
9 generated_by: 'Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010'
1010 license: perl
1111 meta-spec:
1212 url: http://module-build.sourceforge.net/META-spec-v1.4.html
13 version: 1.4
13 version: '1.4'
1414 name: Mason-Plugin-Cache
1515 no_index:
1616 directory:
1717 - lib/Mason/Plugin/Cache
1818 requires:
19 CHI: 0
20 Mason: 2.09
19 CHI: '0'
20 Mason: '2.09'
2121 resources:
2222 bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Mason-Plugin-Cache
2323 repository: git://github.com/jonswar/perl-mason-plugin-cache.git
24 version: 0.05
24 version: '0.05'
25 x_generated_by_perl: v5.32.1
26 x_serialization_backend: 'YAML::Tiny version 1.73'
27 x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'
0
0 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.017.
11 use strict;
22 use warnings;
33
44
55
6 use ExtUtils::MakeMaker 6.30;
7
8
6 use ExtUtils::MakeMaker;
97
108 my %WriteMakefileArgs = (
11 'ABSTRACT' => 'Provide compnent cache object and filter',
12 'AUTHOR' => 'Jonathan Swartz <swartz@pobox.com>',
13 'BUILD_REQUIRES' => {
14 'Test::Class::Most' => '0'
9 "ABSTRACT" => "Provide compnent cache object and filter",
10 "AUTHOR" => "Jonathan Swartz <swartz\@pobox.com>",
11 "CONFIGURE_REQUIRES" => {
12 "ExtUtils::MakeMaker" => 0
1513 },
16 'CONFIGURE_REQUIRES' => {
17 'ExtUtils::MakeMaker' => '6.30'
14 "DISTNAME" => "Mason-Plugin-Cache",
15 "LICENSE" => "perl",
16 "NAME" => "Mason::Plugin::Cache",
17 "PREREQ_PM" => {
18 "CHI" => 0,
19 "Mason" => "2.09"
1820 },
19 'DISTNAME' => 'Mason-Plugin-Cache',
20 'EXE_FILES' => [],
21 'LICENSE' => 'perl',
22 'NAME' => 'Mason::Plugin::Cache',
23 'PREREQ_PM' => {
24 'CHI' => '0',
25 'Mason' => '2.09'
21 "TEST_REQUIRES" => {
22 "Test::Class::Most" => 0
2623 },
27 'VERSION' => '0.05',
28 'test' => {
29 'TESTS' => 't/*.t'
24 "VERSION" => "0.05",
25 "test" => {
26 "TESTS" => "t/*.t"
3027 }
3128 );
3229
3330
34 unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
35 my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
36 my $pp = $WriteMakefileArgs{PREREQ_PM};
37 for my $mod ( keys %$br ) {
38 if ( exists $pp->{$mod} ) {
39 $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
40 }
41 else {
42 $pp->{$mod} = $br->{$mod};
43 }
44 }
31 my %FallbackPrereqs = (
32 "CHI" => 0,
33 "Mason" => "2.09",
34 "Test::Class::Most" => 0
35 );
36
37
38 unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
39 delete $WriteMakefileArgs{TEST_REQUIRES};
40 delete $WriteMakefileArgs{BUILD_REQUIRES};
41 $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
4542 }
4643
4744 delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
4845 unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
4946
5047 WriteMakefile(%WriteMakefileArgs);
51
52
53
+0
-107
README less more
0 NAME
1 Mason::Plugin::Cache - Provide component cache object and filter
2
3 VERSION
4 version 0.05
5
6 SYNOPSIS
7 my $result = $.cache->get('key');
8 if (!defined($result)) {
9 ... compute $result ...
10 $.cache->set('key', $result, '5 minutes');
11 }
12
13 ...
14
15 % $.Cache('key2', '1 hour') {{
16 <!-- this will be cached for an hour -->
17 % }}
18
19 DESCRIPTION
20 Adds a `cache' method and `Cache' filter to access a cache (CHI) object
21 with a namespace unique to the component.
22
23 INTERP PARAMETERS
24 cache_defaults
25 Hash of parameters passed to cache constructor. Defaults to
26
27 driver=>'File', root_dir => 'DATA_DIR/cache'
28
29 which will create a basic file cache under Mason's data directory.
30
31 cache_root_class
32 Class used to create a cache. Defaults to CHI.
33
34 COMPONENT CLASS METHODS
35 cache
36 Returns a new cache object with the namespace set to the component's
37 path. Parameters to this method, if any, are combined with
38 cache_defaults and passed to the cache_root_class constructor. The
39 cache object is memoized when no parameters are passed.
40
41 my $result = $.cache->get('key');
42
43 REQUEST METHODS
44 cache
45 Same as calling `cache' on the current component class. This usage
46 will be familiar to Mason 1 users.
47
48 my $result = $m->cache->get('key');
49
50 FILTERS
51 Cache ($key, $options, [%cache_params])
52 Caches the content using `$self->cache' and the supplied cache
53 *$key*.
54
55 *$options* is a scalar or hash reference. If a scalar, it is treated
56 as the `expires_in' duration and passed as the third argument to
57 `set'. If it is a hash reference, it may contain name/value pairs
58 for both `get' and `set'.
59
60 *%cache_params*, if any, are passed to `$self->cache'.
61
62 % $.Cache($my_key, '1 hour') {{
63 <!-- this will be cached for an hour -->
64 % }}
65
66 % $.Cache($my_key, { expire_if => sub { $.refresh } }, driver => 'RawMemory') {{
67 <!-- this will be cached until $.refresh is true -->
68 % }}
69
70 If neither *$key* nor *$options* are passed, the key is set to
71 'Default' and the cache never expires.
72
73 % $.Cache() {{
74 <!-- cache this forever, or until explicitly removed -->
75 % }}
76
77 SUPPORT
78 The mailing list for Mason and Mason plugins is
79 mason-users@lists.sourceforge.net. You must be subscribed to send a
80 message. To subscribe, visit
81 https://lists.sourceforge.net/lists/listinfo/mason-users.
82
83 You can also visit us at `#mason' on irc:.
84
85 Bugs and feature requests will be tracked at RT:
86
87 http://rt.cpan.org/NoAuth/Bugs.html?Dist=Mason-Plugin-Cache
88 bug-mason-plugin-cache@rt.cpan.org
89
90 The latest source code can be browsed and fetched at:
91
92 http://github.com/jonswar/perl-mason-plugin-cache
93 git clone git://github.com/jonswar/perl-mason-plugin-cache.git
94
95 SEE ALSO
96 Mason
97
98 AUTHOR
99 Jonathan Swartz <swartz@pobox.com>
100
101 COPYRIGHT AND LICENSE
102 This software is copyright (c) 2011 by Jonathan Swartz.
103
104 This is free software; you can redistribute it and/or modify it under
105 the same terms as the Perl 5 programming language system itself.
106
0 libmason-plugin-cache-perl (0.05-2) UNRELEASED; urgency=medium
0 libmason-plugin-cache-perl (0.05+git20121029.1.29a2bd5-1) UNRELEASED; urgency=medium
11
22 [ gregor herrmann ]
33 * Strip trailing slash from metacpan URLs.
2121 [ gregor herrmann ]
2222 * debian/watch: use uscan version 4.
2323
24 -- gregor herrmann <gregoa@debian.org> Thu, 27 Feb 2014 22:37:32 +0100
24 [ Debian Janitor ]
25 * New upstream snapshot.
26
27 -- gregor herrmann <gregoa@debian.org> Tue, 05 Oct 2021 19:01:10 -0000
2528
2629 libmason-plugin-cache-perl (0.05-1.1) unstable; urgency=medium
2730
00 package Mason::Plugin::Cache::Component;
1 BEGIN {
2 $Mason::Plugin::Cache::Component::VERSION = '0.05';
3 }
1 $Mason::Plugin::Cache::Component::VERSION = '0.05';
42 use Mason::PluginRole;
53
64 my %memoized;
00 package Mason::Plugin::Cache::Filters;
1 BEGIN {
2 $Mason::Plugin::Cache::Filters::VERSION = '0.05';
3 }
1 $Mason::Plugin::Cache::Filters::VERSION = '0.05';
42 use Mason::PluginRole;
53
64 method Cache ( $key, $set_options, %cache_options ) {
00 package Mason::Plugin::Cache::Interp;
1 BEGIN {
2 $Mason::Plugin::Cache::Interp::VERSION = '0.05';
3 }
1 $Mason::Plugin::Cache::Interp::VERSION = '0.05';
42 use CHI;
53 use Mason::Util qw(catdir);
64 use Mason::PluginRole;
00 package Mason::Plugin::Cache::Request;
1 BEGIN {
2 $Mason::Plugin::Cache::Request::VERSION = '0.05';
3 }
1 $Mason::Plugin::Cache::Request::VERSION = '0.05';
42 use Mason::PluginRole;
53
64 method cache () {
00 package Mason::Plugin::Cache::t::Basic;
1 BEGIN {
2 $Mason::Plugin::Cache::t::Basic::VERSION = '0.05';
3 }
1 $Mason::Plugin::Cache::t::Basic::VERSION = '0.05';
42 use Test::Class::Most parent => 'Mason::Test::Class';
53
64 __PACKAGE__->default_plugins( [ '@Default', 'Cache' ] );
00 package Mason::Plugin::Cache;
1 BEGIN {
2 $Mason::Plugin::Cache::VERSION = '0.05';
3 }
1 $Mason::Plugin::Cache::VERSION = '0.05';
42 use Moose;
53 with 'Mason::Plugin';
64
86
97 1;
108
11
9 __END__
1210
1311 =pod
1412
151149 the same terms as the Perl 5 programming language system itself.
152150
153151 =cut
154
155
156 __END__
157