Subject: | anonymouse sub should have is_debuggable flag flushed |
package DB;
sub DB {
establish_cleanup sub { };
}
the 'sub {}' is compiled at DB package and callback is established from DB::DB subroutine
but if you add `sub sub {}` into your package you will notice that it is called for that ANON sub
According to doc: http://perldoc.perl.org/perldebguts.html
When execution of the program reaches a subroutine call, a call to &DB::sub (args) is made instead, with $DB::sub holding the name of the called subroutine. (This doesn't happen if the subroutine was compiled in the DB package.)
If I flush 'is_debuggable' flag for that ANON sub everything works fine.