Update of /cvsroot/perl-xml/xml-simple/lib/XML
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19123/lib/XML
Modified Files:
Simple.pm
Log Message:
- VMS locking fixes (patch from Peter (Stig) Edwards)
Index: Simple.pm
===================================================================
RCS file: /cvsroot/perl-xml/xml-simple/lib/XML/Simple.pm,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- Simple.pm 17 Nov 2004 08:36:49 -0000 1.22
+++ Simple.pm 29 Jan 2005 04:16:10 -0000 1.23
@@ -53,7 +53,7 @@
@ISA = qw(Exporter);
@EXPORT = qw(XMLin XMLout);
@EXPORT_OK = qw(xml_in xml_out);
-$VERSION = '2.13';
+$VERSION = '2.14';
$PREFERRED_PARSER = undef;
my $StrictMode = 0;
@@ -358,9 +358,13 @@
require Storable; # We didn't need it until now
- # If the following line fails for you, your Storable.pm is old - upgrade
-
- Storable::lock_nstore($data, $cachefile);
+ if ('VMS' eq $^O) {
+ Storable::nstore($data, $cachefile);
+ }
+ else {
+ # If the following line fails for you, your Storable.pm is old - upgrade
+ Storable::lock_nstore($data, $cachefile);
+ }
}
@@ -384,7 +388,12 @@
require Storable; # We didn't need it until now
- return(Storable::lock_retrieve($cachefile));
+ if ('VMS' eq $^O) {
+ return(Storable::retrieve($cachefile));
+ }
+ else {
+ return(Storable::lock_retrieve($cachefile));
+ }
}
|