Author: iarnell Update of /cvs/pkgs/rpms/perl-Catalyst-Plugin-PageCache/F-10 In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5724/F-10 Modified Files: .cvsignore sources Added Files: FileCache.pm perl-Catalyst-Plugin-PageCache.spec Log Message: initial import --- NEW FILE FileCache.pm --- package Catalyst::Plugin::Cache::FileCache; use strict; use base 'Class::Data::Inheritable'; our $VERSION = '0.7'; use Cache::FileCache; __PACKAGE__->mk_classdata('cache'); sub setup { my $self = shift; my $params = {}; if ( $self->config->{cache} ) { $params = { %{ $self->config->{cache} } }; } if ( $params->{storage} ) { $params->{cache_root} = delete $params->{storage}; } if ( $params->{expires} ) { $params->{default_expires_in} = delete $params->{expires}; } $self->cache( Cache::FileCache->new($params) ); return $self->NEXT::setup(@_); } 1; __END__ =head1 NAME Catalyst::Plugin::Cache::FileCache - (DEPRECATED) File cache =head1 SYNOPSIS use Catalyst qw[Cache::FileCache]; MyApp->config->{cache}->{storage} = '/tmp'; MyApp->config->{cache}->{expires} = 3600; my $data; unless ( $data = $c->cache->get('data') ) { $data = MyApp::Model::Data->retrieve('data'); $c->cache->set( 'data', $data ); } $c->response->body($data); =head1 DEPRECATION NOTICE This module has been deprecated in favor of L<Catalyst::Plugin::Cache>. You can configure that module to use a FileCache backend. =head1 DESCRIPTION Extends base class with a file cache. =head1 METHODS =head2 setup =head2 cache Returns an instance of C<Cache::FileCache> =head1 SEE ALSO L<Catalyst::Plugin::Cache>, L<Cache::FileCache>, L<Catalyst>. =head1 AUTHOR Christian Hansen, C<ch@xxxxxxxxxxx> Sebastian Riedel C<sri@xxxxxxx> =head1 LICENSE This library is free software . You can redistribute it and/or modify it under the same terms as perl itself. =cut --- NEW FILE perl-Catalyst-Plugin-PageCache.spec --- Name: perl-Catalyst-Plugin-PageCache Version: 0.22 Release: 1%{?dist} Summary: Cache the output of entire pages License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Catalyst-Plugin-PageCache/ Source0: http://www.cpan.org/authors/id/M/MR/MRAMBERG/Catalyst-Plugin-PageCache-%{version}.tar.gz # Catalyst::Plugin::Cache::FileCache is deprecated, but necessary for testing # this module. Rather than package a deprecated module, just include a private # copy here for testing (license is also "same as perl") # upstream bug at http://rt.cpan.org/Ticket/Display.html?id=47373 Source1: http://search.cpan.org/src/MRAMBERG/Catalyst-Plugin-Cache-FileCache-0.7/lib/Catalyst/Plugin/Cache/FileCache.pm BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: perl(Catalyst::Plugin::I18N) BuildRequires: perl(Catalyst::Runtime) BuildRequires: perl(DateTime) BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(MRO::Compat) >= 0.10 BuildRequires: perl(Test::More) BuildRequires: perl(Test::Pod) BuildRequires: perl(Test::Pod::Coverage) # for FileCache BuildRequires: perl(Cache::FileCache) BuildRequires: perl(Class::Data::Inheritable) Requires: perl(Catalyst::Runtime) Requires: perl(Class::Accessor::Fast) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description Many dynamic websites perform heavy processing on most pages, yet this information may rarely change from request to request. Using the PageCache plugin, you can cache the full output of different pages so they are served to your visitors as fast as possible. This method of caching is very useful for withstanding a Slashdotting, for example. %prep %setup -q -n Catalyst-Plugin-PageCache-%{version} iconv -f iso-8859-1 -t utf-8 README >README.conv && mv README.conv README # install private copy file FileCache install -D -m 0644 %{SOURCE1} t/lib/Catalyst/Plugin/Cache/FileCache.pm %build PERL5_CPANPLUS_IS_RUNNING=1 %{__perl} Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; %{_fixperms} $RPM_BUILD_ROOT/* %check TEST_POD=yep make test %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc Changes README %{perl_vendorlib}/* %{_mandir}/man3/* %changelog * Sun Jul 19 2009 Iain Arnell 0.22-1 - Specfile autogenerated by cpanspec 1.78. Index: .cvsignore =================================================================== RCS file: /cvs/pkgs/rpms/perl-Catalyst-Plugin-PageCache/F-10/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -r1.1 -r1.2 --- .cvsignore 5 Aug 2009 06:12:02 -0000 1.1 +++ .cvsignore 5 Aug 2009 14:29:49 -0000 1.2 @@ -0,0 +1 @@ +Catalyst-Plugin-PageCache-0.22.tar.gz Index: sources =================================================================== RCS file: /cvs/pkgs/rpms/perl-Catalyst-Plugin-PageCache/F-10/sources,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -r1.1 -r1.2 --- sources 5 Aug 2009 06:12:02 -0000 1.1 +++ sources 5 Aug 2009 14:29:49 -0000 1.2 @@ -0,0 +1 @@ +46bc5d125956f66424aec94d33b087df Catalyst-Plugin-PageCache-0.22.tar.gz -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl Fedora-perl-devel-list mailing list Fedora-perl-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-perl-devel-list