develooper Front page | perl.tcltk | Postings from July 2018

[ #125472] error with coderefs passes as scalar args

Thread Previous
SJ Luo via RT
July 3, 2018 04:10
[ #125472] error with coderefs passes as scalar args
Message ID:
<URL: >


I am trying to understand the content of the code disposal patches. So far I cannot fully make it out but I think it would be more efficient than the previous one. There are something I'd like to discuss:

1) The new version put document of originally internal function create_tcl_sub() as a new API. IMHO programmers should always use the form "$interp->call(...,WRITABLE=>$sub)" if they want code disposal to be handled automatically; otherwise, they could just apply original API CreateCommnd() - DeleteCommand() pair to handle code creation and disposal manually. Providing another create_tcl_sub() - _code_dispose() pair looks duplicating and confusing. Besides, user may find it difficult to provide DESCRNAME arg value.

2) The newest POD in github HEAD mentioned


won't dispose the sub created from

    $interp->call('fileevent','sock9827430', 'writable'=>sub{...});

is it still true? Or only 'set' command behaves in this way?

3) The POD mentioned two functions _code_destroy() and destroy_ref() which cannot be found in I guess you mean _code_dispose() and delete_ref(). IMO we just need to have delete_ref() in POD. Disclosing both of them might be confusing too.


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About