diff options
author | Gisle Aas <aas@bergen.sn.no> | 1997-08-07 00:00:00 +0000 |
---|---|---|
committer | Tim Bunce <Tim.Bunce@ig.co.uk> | 1997-08-07 00:00:00 +1200 |
commit | cb628fe93d2f7c1643c96d783d036f8905a3b977 (patch) | |
tree | f33e5330380cc965ddcc97427d26aac7df94b4c6 /ext/IO/lib | |
parent | d924de76f77ae52d0d85935b55bcc109810da0ba (diff) | |
download | perl-cb628fe93d2f7c1643c96d783d036f8905a3b977.tar.gz |
IO::File and DB_File pollutes namespace with Fcntl constants
private-msgid: h205qyijy.fsf@bergen.sn.no
Diffstat (limited to 'ext/IO/lib')
-rw-r--r-- | ext/IO/lib/IO/File.pm | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/ext/IO/lib/IO/File.pm b/ext/IO/lib/IO/File.pm index b1aecffb5d..de7fabc6f2 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); +}; ################################################ |