Subject: | Patch for XML::Simple 2.13 on VMS |
Patch for XML::Simple 2.13 on VMS.
A few changes required for the test cases to pass on VMS.
In simple.pm as VMS does not require or support file locking, if OS is VMS then call Storable::nstore and not Storable::lock_nstore.
simple.pm
361,364c361,367
< # If the following line fails for you, your Storable.pm is old - upgrade
<
< Storable::lock_nstore($data, $cachefile);
<
---
Show quoted text
> if ('VMS' eq $^O) {
> # If the following line fails for you, your Storable.pm is old - upgrade
> Storable::nstore($data, $cachefile);
> } else {
> Storable::lock_nstore($data, $cachefile);
> }
>
386,388c389,395
<
< return(Storable::lock_retrieve($cachefile));
<
---
Show quoted text>
> if ('VMS' eq $^O) {
> return(Storable::retrieve($cachefile));
> } else {
> return(Storable::lock_retrieve($cachefile));
> }
>
In the three test case files 3_storable.t, 4_memshare.t and 5_memcopy.t for VMS we have to unlink all versions of a file, see the following link for more info on unlink on VMS: http://www.perl.com/doc/manual/html/vms/perlvms.html#Perl_functions
3_storable.t
128a129,132
Show quoted text> #use Data::Dumper;
> #print "XMLFile = '$XMLFile'\n";
> #print "opt = ",Dumper($opt);
> #print "Expected = ",Dumper($Expected);
129a134
Show quoted text> #print "CacheFile = '$CacheFile'\n";
130a136
Show quoted text>
148,149c154,158
<
< unlink($XMLFile);
---
Show quoted text> if ('VMS' eq $^O) {
> 1 while (unlink($XMLFile));
> } else {
> unlink($XMLFile);
> }
4_memshare.t
116c116,120
< unlink($XMLFile);
---
Show quoted text> if ('VMS' eq $^O) {
> 1 while (unlink($XMLFile));
> } else {
> unlink($XMLFile);
> }
5_memcopy.t
120c120,124
< unlink($XMLFile);
---
Show quoted text> if ('VMS' eq $^O) {
> 1 while (unlink($XMLFile));
> } else {
> unlink($XMLFile);
> }
Thanks for the module, looking forward to using it.
Peter (Stig) Edwards