From: Perl 5 Porters Date: Tue, 6 Feb 1996 14:09:49 +0000 (+0000) Subject: perl 5.002gamma: ext/FileHandle/FileHandle.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dd7f575909ebc69e291e1e8c76970c6fa8cac237;p=p5sagit%2Fp5-mst-13.2.git perl 5.002gamma: ext/FileHandle/FileHandle.pm >From pmarquess@bfsec.bt.co.ukTue Feb 6 09:38:27 1996 >Date: Tue, 6 Feb 96 14:09:49 GMT >From: Paul Marquess >To: perl5-porters@africa.nicoh.com >Cc: pmarquess@bfsec.bt.co.uk >Subject: VERSION Patch >From chip@atlantic.netTue Feb 6 12:14:01 1996 >Date: Tue, 6 Feb 1996 12:03:43 -0500 (EST) >From: Chip Salzenberg >To: andreas.koenig@mind.de >Cc: perl5-porters@africa.nicoh.com >Subject: Beta3: Allow 'use FileHandle' in miniperl --- diff --git a/ext/FileHandle/FileHandle.pm b/ext/FileHandle/FileHandle.pm index 93a3088..d6832db 100644 --- a/ext/FileHandle/FileHandle.pm +++ b/ext/FileHandle/FileHandle.pm @@ -35,7 +35,7 @@ FileHandle - supply object methods for filehandles ($readfh, $writefh) = FileHandle::pipe; autoflush STDOUT 1; - + =head1 DESCRIPTION C creates a C, which is a reference to a @@ -131,8 +131,8 @@ class from C and inherit those methods. =cut require 5.000; +use vars qw($VERSION @EXPORT @EXPORT_OK $AUTOLOAD); use Carp; -use Fcntl; use Symbol; use English; use SelectSaver; @@ -141,8 +141,9 @@ require Exporter; require DynaLoader; @ISA = qw(Exporter DynaLoader); -@EXPORT = (@Fcntl::EXPORT, - qw(_IOFBF _IOLBF _IONBF)); +$VERSION = "1.00" ; + +@EXPORT = qw(_IOFBF _IOLBF _IONBF); @EXPORT_OK = qw( autoflush @@ -166,10 +167,31 @@ require DynaLoader; ################################################ +## If the Fcntl extension is available, +## export its constants. +## + +sub import { + my $pkg = shift; + my $callpkg = caller; + Exporter::export $pkg, $callpkg; + eval { + require Fcntl; + Exporter::export 'Fcntl', $callpkg; + }; +}; + + +################################################ ## Interaction with the XS. ## -bootstrap FileHandle; +eval { + bootstrap FileHandle; +}; +if ($@) { + *constant = sub { undef }; +} sub AUTOLOAD { if ($AUTOLOAD =~ /::(_?[a-z])/) {