Skip Menu |

This queue is for tickets about the XML-Simple CPAN distribution.

Report information
The Basics
Id: 9091
Status: resolved
Priority: 0/
Queue: XML-Simple

People
Owner: grantm [...] cpan.org
Requestors: cpan [...] pjedwards.co.uk
Cc:
AdminCc:

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



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
From: cpan [...] pjedwards.co.uk
[guest - Wed Dec 22 12:48:23 2004]: Show quoted text
> 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); > < > ---
> > 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)); > < > ---
> > > > 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
> > #use Data::Dumper; > > #print "XMLFile = '$XMLFile'\n"; > > #print "opt = ",Dumper($opt); > > #print "Expected = ",Dumper($Expected);
> 129a134
> > #print "CacheFile = '$CacheFile'\n";
> 130a136
> >
> 148,149c154,158 > < > < unlink($XMLFile); > ---
> > if ('VMS' eq $^O) { > > 1 while (unlink($XMLFile)); > > } else { > > unlink($XMLFile); > > }
> > > 4_memshare.t > 116c116,120 > < unlink($XMLFile); > ---
> > if ('VMS' eq $^O) { > > 1 while (unlink($XMLFile)); > > } else { > > unlink($XMLFile); > > }
> > > 5_memcopy.t > 120c120,124 > < unlink($XMLFile); > ---
> > if ('VMS' eq $^O) { > > 1 while (unlink($XMLFile)); > > } else { > > unlink($XMLFile); > > }
> > Thanks for the module, looking forward to using it. > > Peter (Stig) Edwards
Just one more fix in the test case 7_saxstuff.t in version 2.13, line 105 is: unlink($CacheFile) If this could be changed to: 1 while (unlink($CacheFile)); that would be great, the reason is VMS has file versions, each needs to be deleted, as explained under the section unlink here: http://www.perl.com/doc/manual/html/vms/perlvms.html Thanks, Peter (Stig) Edwards
Your patch has been incorporated into XML::Simple release 2.14. Thank you for your contribution. Regards Grant