[ Debian Janitor ]
New upstream snapshot.
Debian Janitor
2 years ago
0 | ||
1 | 0 | This is the Perl distribution Mason-Plugin-Cache. |
2 | 1 | |
3 | 2 | Installing Mason-Plugin-Cache is straightforward. |
8 | 7 | |
9 | 8 | % cpanm Mason::Plugin::Cache |
10 | 9 | |
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. | |
15 | 14 | |
16 | 15 | ## Installing with the CPAN shell |
17 | 16 | |
21 | 20 | |
22 | 21 | ## Manual installation |
23 | 22 | |
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: | |
26 | 28 | |
27 | 29 | % perl Makefile.PL |
28 | 30 | % make && make test |
31 | 33 | |
32 | 34 | % make install |
33 | 35 | |
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`. | |
35 | 37 | |
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. | |
37 | 65 | |
38 | 66 | ## Documentation |
39 | 67 | |
40 | 68 | 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: | |
42 | 70 | |
43 | 71 | % 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 |
17 | 17 | |
18 | 18 | The GNU General Public License, Version 1, February 1989 |
19 | 19 | |
20 | GNU GENERAL PUBLIC LICENSE | |
21 | Version 1, February 1989 | |
20 | GNU GENERAL PUBLIC LICENSE | |
21 | Version 1, February 1989 | |
22 | 22 | |
23 | 23 | 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 | ||
25 | 26 | Everyone is permitted to copy and distribute verbatim copies |
26 | 27 | of this license document, but changing it is not allowed. |
27 | 28 | |
28 | Preamble | |
29 | Preamble | |
29 | 30 | |
30 | 31 | The license agreements of most software companies try to keep users |
31 | 32 | at the mercy of those companies. By contrast, our General Public |
66 | 67 | The precise terms and conditions for copying, distribution and |
67 | 68 | modification follow. |
68 | 69 | |
69 | GNU GENERAL PUBLIC LICENSE | |
70 | GNU GENERAL PUBLIC LICENSE | |
70 | 71 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
71 | 72 | |
72 | 73 | 0. This License Agreement applies to any program or other work which |
184 | 185 | of preserving the free status of all derivatives of our free software and |
185 | 186 | of promoting the sharing and reuse of software generally. |
186 | 187 | |
187 | NO WARRANTY | |
188 | NO WARRANTY | |
188 | 189 | |
189 | 190 | 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY |
190 | 191 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN |
206 | 207 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE |
207 | 208 | POSSIBILITY OF SUCH DAMAGES. |
208 | 209 | |
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 | |
212 | 213 | |
213 | 214 | If you develop a new program, and you want it to be of the greatest |
214 | 215 | possible use to humanity, the best way to achieve this is to make it |
234 | 235 | GNU General Public License for more details. |
235 | 236 | |
236 | 237 | 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 | ||
239 | 241 | |
240 | 242 | Also add information on how to contact you by electronic and paper mail. |
241 | 243 | |
289 | 291 | |
290 | 292 | - "Package" refers to the collection of files distributed by the Copyright |
291 | 293 | Holder, and derivatives of that collection of files created through |
292 | textual modification. | |
294 | textual modification. | |
293 | 295 | - "Standard Version" refers to such a Package if it has not been modified, |
294 | 296 | or has been modified in accordance with the wishes of the Copyright |
295 | Holder. | |
297 | Holder. | |
296 | 298 | - "Copyright Holder" is whoever is named in the copyright or copyrights for |
297 | the package. | |
299 | the package. | |
298 | 300 | - "You" is you, if you're thinking about copying or distributing this Package. |
299 | 301 | - "Reasonable copying fee" is whatever you can justify on the basis of media |
300 | 302 | cost, duplication charges, time of people involved, and so on. (You will |
301 | 303 | 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.) | |
303 | 305 | - "Freely Available" means that no fee is charged for the item itself, though |
304 | 306 | there may be fees involved in handling the item. It also means that |
305 | 307 | recipients of the item may redistribute it under the same conditions they |
306 | received it. | |
308 | received it. | |
307 | 309 | |
308 | 310 | 1. You may make and give away verbatim copies of the source form of the |
309 | 311 | Standard Version of this Package without restriction, provided that you |
370 | 372 | |
371 | 373 | 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED |
372 | 374 | WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF |
373 | MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
375 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
374 | 376 | |
375 | 377 | The End |
376 | 378 |
0 | # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.017. | |
0 | 1 | Changes |
1 | 2 | INSTALL |
2 | 3 | LICENSE |
3 | 3 | "Jonathan Swartz <swartz@pobox.com>" |
4 | 4 | ], |
5 | 5 | "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", | |
7 | 7 | "license" : [ |
8 | 8 | "perl_5" |
9 | 9 | ], |
10 | 10 | "meta-spec" : { |
11 | 11 | "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", |
12 | "version" : "2" | |
12 | "version" : 2 | |
13 | 13 | }, |
14 | 14 | "name" : "Mason-Plugin-Cache", |
15 | 15 | "no_index" : { |
20 | 20 | "prereqs" : { |
21 | 21 | "configure" : { |
22 | 22 | "requires" : { |
23 | "ExtUtils::MakeMaker" : "6.30" | |
23 | "ExtUtils::MakeMaker" : "0" | |
24 | 24 | } |
25 | 25 | }, |
26 | 26 | "runtime" : { |
27 | 27 | "requires" : { |
28 | "CHI" : 0, | |
28 | "CHI" : "0", | |
29 | 29 | "Mason" : "2.09" |
30 | 30 | } |
31 | 31 | }, |
32 | 32 | "test" : { |
33 | 33 | "requires" : { |
34 | "Test::Class::Most" : 0 | |
34 | "Test::Class::Most" : "0" | |
35 | 35 | } |
36 | 36 | } |
37 | 37 | }, |
47 | 47 | "web" : "https://github.com/jonswar/perl-mason-plugin-cache" |
48 | 48 | } |
49 | 49 | }, |
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" | |
51 | 54 | } |
52 | 55 |
2 | 2 | author: |
3 | 3 | - 'Jonathan Swartz <swartz@pobox.com>' |
4 | 4 | build_requires: |
5 | Test::Class::Most: 0 | |
5 | Test::Class::Most: '0' | |
6 | 6 | configure_requires: |
7 | ExtUtils::MakeMaker: 6.30 | |
7 | ExtUtils::MakeMaker: '0' | |
8 | 8 | 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' | |
10 | 10 | license: perl |
11 | 11 | meta-spec: |
12 | 12 | url: http://module-build.sourceforge.net/META-spec-v1.4.html |
13 | version: 1.4 | |
13 | version: '1.4' | |
14 | 14 | name: Mason-Plugin-Cache |
15 | 15 | no_index: |
16 | 16 | directory: |
17 | 17 | - lib/Mason/Plugin/Cache |
18 | 18 | requires: |
19 | CHI: 0 | |
20 | Mason: 2.09 | |
19 | CHI: '0' | |
20 | Mason: '2.09' | |
21 | 21 | resources: |
22 | 22 | bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Mason-Plugin-Cache |
23 | 23 | 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. | |
1 | 1 | use strict; |
2 | 2 | use warnings; |
3 | 3 | |
4 | 4 | |
5 | 5 | |
6 | use ExtUtils::MakeMaker 6.30; | |
7 | ||
8 | ||
6 | use ExtUtils::MakeMaker; | |
9 | 7 | |
10 | 8 | 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 | |
15 | 13 | }, |
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" | |
18 | 20 | }, |
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 | |
26 | 23 | }, |
27 | 'VERSION' => '0.05', | |
28 | 'test' => { | |
29 | 'TESTS' => 't/*.t' | |
24 | "VERSION" => "0.05", | |
25 | "test" => { | |
26 | "TESTS" => "t/*.t" | |
30 | 27 | } |
31 | 28 | ); |
32 | 29 | |
33 | 30 | |
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; | |
45 | 42 | } |
46 | 43 | |
47 | 44 | delete $WriteMakefileArgs{CONFIGURE_REQUIRES} |
48 | 45 | unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; |
49 | 46 | |
50 | 47 | WriteMakefile(%WriteMakefileArgs); |
51 | ||
52 | ||
53 |
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 | |
1 | 1 | |
2 | 2 | [ gregor herrmann ] |
3 | 3 | * Strip trailing slash from metacpan URLs. |
21 | 21 | [ gregor herrmann ] |
22 | 22 | * debian/watch: use uscan version 4. |
23 | 23 | |
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 | |
25 | 28 | |
26 | 29 | libmason-plugin-cache-perl (0.05-1.1) unstable; urgency=medium |
27 | 30 |
0 | 0 | package Mason::Plugin::Cache::Component; |
1 | BEGIN { | |
2 | $Mason::Plugin::Cache::Component::VERSION = '0.05'; | |
3 | } | |
1 | $Mason::Plugin::Cache::Component::VERSION = '0.05'; | |
4 | 2 | use Mason::PluginRole; |
5 | 3 | |
6 | 4 | my %memoized; |
0 | 0 | package Mason::Plugin::Cache::Filters; |
1 | BEGIN { | |
2 | $Mason::Plugin::Cache::Filters::VERSION = '0.05'; | |
3 | } | |
1 | $Mason::Plugin::Cache::Filters::VERSION = '0.05'; | |
4 | 2 | use Mason::PluginRole; |
5 | 3 | |
6 | 4 | method Cache ( $key, $set_options, %cache_options ) { |
0 | 0 | package Mason::Plugin::Cache::Interp; |
1 | BEGIN { | |
2 | $Mason::Plugin::Cache::Interp::VERSION = '0.05'; | |
3 | } | |
1 | $Mason::Plugin::Cache::Interp::VERSION = '0.05'; | |
4 | 2 | use CHI; |
5 | 3 | use Mason::Util qw(catdir); |
6 | 4 | use Mason::PluginRole; |
0 | 0 | package Mason::Plugin::Cache::Request; |
1 | BEGIN { | |
2 | $Mason::Plugin::Cache::Request::VERSION = '0.05'; | |
3 | } | |
1 | $Mason::Plugin::Cache::Request::VERSION = '0.05'; | |
4 | 2 | use Mason::PluginRole; |
5 | 3 | |
6 | 4 | method cache () { |
0 | 0 | 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'; | |
4 | 2 | use Test::Class::Most parent => 'Mason::Test::Class'; |
5 | 3 | |
6 | 4 | __PACKAGE__->default_plugins( [ '@Default', 'Cache' ] ); |
0 | 0 | package Mason::Plugin::Cache; |
1 | BEGIN { | |
2 | $Mason::Plugin::Cache::VERSION = '0.05'; | |
3 | } | |
1 | $Mason::Plugin::Cache::VERSION = '0.05'; | |
4 | 2 | use Moose; |
5 | 3 | with 'Mason::Plugin'; |
6 | 4 | |
8 | 6 | |
9 | 7 | 1; |
10 | 8 | |
11 | ||
9 | __END__ | |
12 | 10 | |
13 | 11 | =pod |
14 | 12 | |
151 | 149 | the same terms as the Perl 5 programming language system itself. |
152 | 150 | |
153 | 151 | =cut |
154 | ||
155 | ||
156 | __END__ | |
157 |