For Programmers: Free Programming Magazines  


Home > Archive > PERL POE > September 2007 > [PATCH] Add (expose really) alias_remove_all() method for POE::Kernel









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author [PATCH] Add (expose really) alias_remove_all() method for POE::Kernel
Rocco Caputo

2007-09-04, 7:30 pm

[Originally redirected to the mailing list on 17 August.]

Hola,

Here is a patch that implements alias_remove_all(). The reason I did
this was because I got a bug report in one of my modules that was
leaking due to the way I had interpreted the documentation to
alias_remove() with no arguments (ie. I'd read it wrong for years).
I'm not the only author that has done this.

It isn't initially obvious how to remove all aliases other than
iterating through them via:

$kernel->alias_remove( $_ ) for $kernel->alias_list( $session );

This patch exposes the internal _data_alias_clear_session and does
some light checking on the public api.

Tests are updated, as are docs for POE::Kernel.

Let me know if I screwed up the white space/style/whatever and I'll
fix it.

Nick
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com