This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: Test::Harness runs tainted tests with wrong library path
[perl5.git] / lib / fields.pm
index 05271a3..54602a6 100644 (file)
@@ -32,7 +32,7 @@ does so by updating the %FIELDS hash in the calling package.
 If a typed lexical variable holding a reference is used to access a
 hash element and the %FIELDS hash of the given type exists, then the
 operation is turned into an array access at compile time.  The %FIELDS
-hash map from hash element names to the array indices.  If the hash
+hash maps from hash element names to the array indices.  If the hash
 element is not present in the %FIELDS hash, then a compile-time error
 is signaled.
 
@@ -50,14 +50,14 @@ which are as compact and as fast arrays to access.  This only works
 as long as the objects are accessed through properly typed variables.
 For untyped access to work you have to make sure that a reference to
 the proper %FIELDS hash is assigned to the 0'th element of the array
-object (so that the objects can be treated like an AVHV).  A
+object (so that the objects can be treated like an pseudo-hash).  A
 constructor like this does the job:
 
   sub new
   {
       my $class = shift;
       no strict 'refs';
-      my $self = bless [\%{"$class\::FIELDS"], $class;
+      my $self = bless [\%{"$class\::FIELDS"}], $class;
       $self;
   }
 
@@ -65,7 +65,7 @@ constructor like this does the job:
 =head1 SEE ALSO
 
 L<base>,
-I<description of AVHVs>
+L<perlref/Pseudo-hashes: Using an array as a hash>
 
 =cut