summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/Hash
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-05-21 00:15:27 +0000
committerKarl Berry <karl@freefriends.org>2012-05-21 00:15:27 +0000
commita4c42bfb2337d37da89d789cb8cc226367994e32 (patch)
treec3eabdef5d565a4e515d2be0d9d4d0540bde0250 /Master/tlpkg/tlperl/lib/Hash
parent8274475057f024d35332ac47c2e2f23ea156e6ed (diff)
perl 5.14.2 from siep
git-svn-id: svn://tug.org/texlive/trunk@26525 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Hash')
-rw-r--r--Master/tlpkg/tlperl/lib/Hash/Util.pm14
-rw-r--r--Master/tlpkg/tlperl/lib/Hash/Util/FieldHash.pm6
2 files changed, 11 insertions, 9 deletions
diff --git a/Master/tlpkg/tlperl/lib/Hash/Util.pm b/Master/tlpkg/tlperl/lib/Hash/Util.pm
index 0fa14690243..8555821309b 100644
--- a/Master/tlpkg/tlperl/lib/Hash/Util.pm
+++ b/Master/tlpkg/tlperl/lib/Hash/Util.pm
@@ -4,6 +4,7 @@ require 5.007003;
use strict;
use Carp;
use warnings;
+no warnings 'uninitialized';
use warnings::register;
use Scalar::Util qw(reftype);
@@ -28,10 +29,9 @@ our @EXPORT_OK = qw(
hash_seed hv_store
);
-our $VERSION = 0.07;
-require DynaLoader;
-local @ISA = qw(DynaLoader);
-bootstrap Hash::Util $VERSION;
+our $VERSION = '0.11';
+require XSLoader;
+XSLoader::load();
sub import {
my $class = shift;
@@ -320,7 +320,8 @@ sub lock_hashref_recurse {
lock_ref_keys($hash);
foreach my $value (values %$hash) {
- if (reftype($value) eq 'HASH') {
+ my $type = reftype($value);
+ if (defined($type) and $type eq 'HASH') {
lock_hashref_recurse($value);
}
Internals::SvREADONLY($value,1);
@@ -332,7 +333,8 @@ sub unlock_hashref_recurse {
my $hash = shift;
foreach my $value (values %$hash) {
- if (reftype($value) eq 'HASH') {
+ my $type = reftype($value);
+ if (defined($type) and $type eq 'HASH') {
unlock_hashref_recurse($value);
}
Internals::SvREADONLY($value,1);
diff --git a/Master/tlpkg/tlperl/lib/Hash/Util/FieldHash.pm b/Master/tlpkg/tlperl/lib/Hash/Util/FieldHash.pm
index bca3a6fd7fc..a13ea856d54 100644
--- a/Master/tlpkg/tlperl/lib/Hash/Util/FieldHash.pm
+++ b/Master/tlpkg/tlperl/lib/Hash/Util/FieldHash.pm
@@ -5,7 +5,7 @@ use strict;
use warnings;
use Scalar::Util qw( reftype);
-our $VERSION = '1.04';
+our $VERSION = '1.09';
require Exporter;
our @ISA = qw(Exporter);
@@ -26,7 +26,7 @@ our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
require XSLoader;
my %ob_reg; # private object registry
sub _ob_reg { \ %ob_reg }
- XSLoader::load('Hash::Util::FieldHash', $VERSION);
+ XSLoader::load();
}
sub fieldhash (\%) {
@@ -753,7 +753,7 @@ incompatibility of object bodies.
=head1 GUTS
To make C<Hash::Util::FieldHash> work, there were two changes to
-F<perl> itself. C<PERL_MAGIC_uvar> was made avalaible for hashes,
+F<perl> itself. C<PERL_MAGIC_uvar> was made available for hashes,
and weak references now call uvar C<get> magic after a weakref has been
cleared. The first feature is used to make field hashes intercept
their keys upon access. The second one triggers garbage collection.