This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
FreeBSD 7+ no longer contains /usr/bin/objformat, so the following
[perl5.git] / ext / Fcntl / Fcntl.pm
index 9cdeb13..83edeb6 100644 (file)
@@ -11,8 +11,8 @@ Fcntl - load the C Fcntl.h defines
 
 =head1 DESCRIPTION
 
-This module is just a translation of the C F<fnctl.h> file.
-Unlike the old mechanism of requiring a translated F<fnctl.ph>
+This module is just a translation of the C F<fcntl.h> file.
+Unlike the old mechanism of requiring a translated F<fcntl.ph>
 file, this uses the B<h2xs> program (see the Perl source distribution)
 and your native C compiler.  This means that it has a 
 far more likely chance of getting the numbers right.
@@ -55,12 +55,16 @@ See L<perlfunc/stat> about the S_I* constants.
 
 =cut
 
+use strict;
 our($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS, $AUTOLOAD);
 
 require Exporter;
 use XSLoader ();
 @ISA = qw(Exporter);
-$VERSION = "1.05";
+BEGIN {
+  $VERSION = "1.06";
+}
+
 # Items to export into callers namespace by default
 # (move infrequently used names to @EXPORT_OK below)
 @EXPORT =
@@ -206,6 +210,11 @@ $VERSION = "1.05";
                   )],
 );
 
+# Force the constants to become inlined
+BEGIN {
+  XSLoader::load 'Fcntl', $VERSION;
+}
+
 sub S_IFMT  { @_ ? ( $_[0] & _S_IFMT() ) : _S_IFMT()  }
 sub S_IMODE { $_[0] & 07777 }
 
@@ -227,10 +236,9 @@ sub AUTOLOAD {
         my (undef,$file,$line) = caller;
         die "$error at $file line $line.\n";
     }
+    no strict 'refs';
     *$AUTOLOAD = sub { $val };
     goto &$AUTOLOAD;
 }
 
-XSLoader::load 'Fcntl', $VERSION;
-
 1;