On Thu, Apr 17, 2008 at 12:35:47AM +0300, Niko Tyni wrote: > I don't know if this is intentional hiding or a bug. We should ask > upstream. POE::Resource::Sessions (where KR_SESSIONS lives) is documented > to be an internal module without any public interface.
Upstream confirmed that this was an accident and not intentional hiding. I'm attaching the 'official' fix from upstream SVN r2312. Cheers, -- Niko Tyni [EMAIL PROTECTED]
Index: poe/lib/POE/Resource/Sessions.pm =================================================================== --- poe/lib/POE/Resource/Sessions.pm (revision 2311) +++ poe/lib/POE/Resource/Sessions.pm (revision 2312) @@ -36,9 +36,7 @@ sub SS_PROCESSES () { 4 } sub SS_ID () { 5 } -sub _data_ses_preload { - $POE::Kernel::poe_kernel->[KR_SESSIONS] = \%kr_sessions; -} +BEGIN { $POE::Kernel::poe_kernel->[KR_SESSIONS] = \%kr_sessions; } ### End-run leak checking. Index: poe/lib/POE/Resource/FileHandles.pm =================================================================== --- poe/lib/POE/Resource/FileHandles.pm (revision 2311) +++ poe/lib/POE/Resource/FileHandles.pm (revision 2312) @@ -35,6 +35,7 @@ ### more unique. my %kr_filenos; +BEGIN { $poe_kernel->[KR_FILENOS] = \%kr_filenos; } sub FNO_MODE_RD () { MODE_RD } # [ [ (fileno read mode structure) # --- BEGIN SUB STRUCT 1 --- # @@ -87,10 +88,6 @@ # }, # }, -sub _data_handle_preload { - $poe_kernel->[KR_FILENOS] = \%kr_filenos; -} - ### Begin-run initialization. sub _data_handle_initialize {