From: Gisle Aas Date: Thu, 7 Aug 1997 00:00:00 +0000 (+0000) Subject: IO::File and DB_File pollutes namespace with Fcntl constants X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cb628fe93d2f7c1643c96d783d036f8905a3b977;p=p5sagit%2Fp5-mst-13.2.git IO::File and DB_File pollutes namespace with Fcntl constants private-msgid: h205qyijy.fsf@bergen.sn.no --- diff --git a/ext/IO/lib/IO/File.pm b/ext/IO/lib/IO/File.pm index b1aecff..de7fabc 100644 --- a/ext/IO/lib/IO/File.pm +++ b/ext/IO/lib/IO/File.pm @@ -115,24 +115,17 @@ require DynaLoader; @ISA = qw(IO::Handle IO::Seekable Exporter DynaLoader); -$VERSION = "1.0602"; +$VERSION = "1.06021"; @EXPORT = @IO::Seekable::EXPORT; -sub import { - my $pkg = shift; - my $callpkg = caller; - Exporter::export $pkg, $callpkg, @_; - - # - # If the Fcntl extension is available, - # export its constants for sysopen(). - # - eval { - require Fcntl; - Exporter::export 'Fcntl', $callpkg, '/^O_/'; - }; -} +eval { + # Make all Fcntl O_XXX constants available for importing + require Fcntl; + my @O = grep /^O_/, @Fcntl::EXPORT; + Fcntl->import(@O); # first we import what we want to export + push(@EXPORT, @O); +}; ################################################