Skip Menu |

This queue is for tickets about the IO CPAN distribution.

Report information
The Basics
Id: 45838
Status: resolved
Priority: 0/
Queue: IO

People
Owner: Nobody in particular
Requestors: DOY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.2301
Fixed in: (no value)



Subject: loading IO modules causes methods to be inserted into other namespaces
Loading any of the core IO::* modules causes the global IO module to be loaded, which inserts all kinds of things into the namespaces of various IO submodules, even if they haven't been loaded yet. They aren't in a usable state by this point (among other things, @ISA isn't set), but this thoroughly confuses modules that want to check to see if a module has been loaded yet (for example, Class::MOP::is_class_loaded). It would be very helpful if doing "use IO::Handle" would only load symbols into the IO::Handle namespace.
Subject: Re: [rt.cpan.org #45838] loading IO modules causes methods to be inserted into other namespaces
Date: Sat, 9 May 2009 20:36:38 -0500
To: bug-IO [...] rt.cpan.org
From: Graham Barr <gbarr [...] pobox.com>
On May 8, 2009, at 12:29 AM, Jesse Luehrs via RT wrote: Show quoted text
> Loading any of the core IO::* modules causes the global IO module to > be > loaded, which inserts all kinds of things into the namespaces of > various > IO submodules, even if they haven't been loaded yet. They aren't in a > usable state by this point (among other things, @ISA isn't set), but > this thoroughly confuses modules that want to check to see if a module > has been loaded yet (for example, Class::MOP::is_class_loaded). It > would > be very helpful if doing "use IO::Handle" would only load symbols into > the IO::Handle namespace.
All the IO modules share a common XS extension, so when that gets bootstrapped it will defined functions on the other namespaces. I would suggest that module attempting to determine if a module is loaded should be fixed.