Skip Menu |
 

This queue is for tickets about the Cache-Cache CPAN distribution.

Report information
The Basics
Id: 112967
Status: open
Priority: 0/
Queue: Cache-Cache

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Digest::SHA1 -> Digest::SHA
Digest::SHA is in core and should be used preferentially over Digest::SHA1.
Download (untitled) / with headers
text/plain 746b
Am Sa 12. Mär 2016, 21:33:43, ETHER schrieb: Show quoted text
> Digest::SHA is in core and should be used preferentially over Digest::SHA1.
+1 This would be really great and only two lines have to be changed: in Makefile.PL line 14: Change 'Digest::SHA1' in 'Digest::SHA' and do the same in the File lib/Cache/FileBackend.pm in line 15. I know Cache::Cache is no longer actively developed. But this is really such a minimal change at has such a huge effect. You then wouldn't need a compiler any more (which is important e.g. in some CGI/Web context). An advantage also compared to CHI!!! In the meantime I saw that Cache also seems not to need a compiler. For easier implementation you find the two files attached. Thanks a lot for all your great work!!!
Subject: FileBackend.pm
Download FileBackend.pm
text/x-perl 14k

Message body is not shown because it is too large.

Subject: Makefile.PL
Download Makefile.PL
text/x-perl 2.2k
use strict; use ExtUtils::MakeMaker; ## # Constants ## my $NAME = 'Cache::Cache'; my $VERSION_FROM = 'lib/Cache/Cache.pm'; my $COMPRESS = 'gzip'; my $SUFFIX = '.gz'; my $DEFAULT_PREREQ_PM = { 'Digest::SHA' => '0', 'File::Spec' => '0.82', 'Storable' => '1.014', 'IPC::ShareLite' => '0.09', 'Error' => '0.15' }; my @NON_IPC_TESTS = ( 't/1_test_cache_interface.t', 't/2_test_memory_cache.t', 't/3_test_file_cache.t', 't/5_test_size_aware_file_cache.t', 't/6_test_size_aware_memory_cache.t' ); ## # Main ## Main( ); ## # Subroutines ## sub Main { my %options; $options{NAME} = $NAME; $options{VERSION_FROM} = $VERSION_FROM; $options{dist} = { COMPRESS => $COMPRESS, SUFFIX => $SUFFIX }; $options{PREREQ_PM} = $DEFAULT_PREREQ_PM; if ( not Has_Module( 'IPC::ShareLite' ) ) { Print_ShareLite_Missing_Message( ); $options{test} = { TESTS => join( ' ', @NON_IPC_TESTS ) }; delete $options{PREREQ_PM}->{'IPC::ShareLite'}; } WriteMakefile( %options ); Print_Make_Test_Message( ); } sub Has_Module { my ( $module ) = @_; print "Checking for $module... "; my $has_module = ( eval "require $module" && ! $@ ); print ( $has_module ? "found\n" : "not found\n" ); return $has_module; } sub Print_ShareLite_Missing_Message { print <<END NOTE: Your system does not seem to have IPC::ShareLite installed. This module is a prerequisite for the SharedMemoryCache implementations. However, since it is not available on all platforms, the Cache::Cache module does not list it as an explicit dependency. If you are able to build IPC::ShareLite (available on CPAN), please install it now and re run this Makefile.PL. Automatically disabling the tests for the SharedMemoryCache. END } sub Print_Make_Test_Message { print <<END ------------------------------------------------------------------ Please be patient while running "make test" as the full test suite takes roughly two minutes to complete. ------------------------------------------------------------------ END }


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.