Skip Menu |

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

Report information
The Basics
Id: 11403
Status: new
Priority: 0/
Queue: Cache-Cache

People
Owner: dewitt [...] unto.net
Requestors: cpan [...] pjedwards.co.uk
Cc:
AdminCc:

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



Subject: Patch for Cache::Cache 1.03 on VMS
Cache::Cache 1.03 under Perl 5.81 on VMS Under VMS there are a few test case failures, these are due to limitations on VMS filenames (characters and length), VMS directory structure differences (directories end in '.dir'), and file versioning when unlinking files. I've included a few suggestions that I used. Cheers, Peter (Stig) Edwards $ gdiff on filebackend.pm 15c15 < use Digest::SHA1 qw( sha1_hex ); --- Show quoted text
> use Digest::SHA1 qw( sha1_hex sha1_base64 ); # added sha1_base64 for VMS file length limitation pedwards 20050204
20d19 < 201c200,210 < return sha1_hex( $p_key ); --- Show quoted text
> # For VMS filename limitations exist (size and characters) , easiest way I found to overcome these is to use sha1_base64 with 2 substitutions > > if ('VMS' eq $^O ) { > my $sUniqueKey = sha1_base64( $p_key ); # 27 char long key, but contains / and + > $sUniqueKey =~ s/\+/plus/g; # replace plus with minus - File::Temp has issues with filenames > $sUniqueKey =~ s/\//slash/g; # replace slash with underscore - File::Temp has issues with filenames > return $sUniqueKey; > } else { > return sha1_hex( $p_key ); # 40 long > } >
340c349 < unlink( _Untaint_Path( $p_path ) ); --- Show quoted text
> 1 while unlink( _Untaint_Path( $p_path ) ); # for VMS, pedwards 20050204
622d630 < } 623a632 Show quoted text
> }
635a645 Show quoted text
>
653c663 < unlink _Untaint_Path( $p_path ); --- Show quoted text
> 1 while unlink _Untaint_Path( $p_path ); # for VMS pedwards 20050204
$ gdiff on cachetester.pm 574a575,584 Show quoted text
> my @aTestNamespaces = sort( 'Default', '__AUTO_PURGE__' ); > > # Using VMS and file cache, need exception for this check - pedwards 20050207 > > if ($^O eq 'VMS') { > if ( ('Cache::SizeAwareFileCache' eq ref $cache) || ('Cache::FileCache' eq ref $cache) ) { > @aTestNamespaces = sort( 'default.dir', '__auto_purge__.dir' ); > } > } >
576c586 < [ sort( 'Default', '__AUTO_PURGE__' ) ] ) ) --- Show quoted text
> [ @aTestNamespaces ] ) )
579,581c589 < } < else < { --- Show quoted text
> } else {