Can not get required info from 'caller' at 'DB::sub'

2015-12-06 Thread KES
http://paste.scsys.co.uk/502483

 Also it is strange to see the DB::DB is called twice for t3.pl (Notice the 
line 82, 85 at the paste)
The twice call does not occour if I remove 'caller' from t3.pl:4. Like: print 
'FROM:';

The output:
...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
t3.pl:9 my $x =  3;

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
t3.pl:11t();
SUB: main::t - 
FROM: main - t3.pl - 17

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
t3.pl:4 print "FROM";
FROM
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
t3.pl:13$x++;
3
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
t3.pl:18print $x;


DB::lsub broke 'caller' results for main programm

2015-12-06 Thread KES
Hi.

I hope you will not be angre If I send links:

http://paste.scsys.co.uk/502493
on the line 67 I expect:
FROM: main - ./t3.pl - 11


This example shows that the client code get info about DB package, but it 
should not
http://paste.scsys.co.uk/502494
You can see that when program is just run the result is:
main ./t3.pl 13
main ./t3.pl 14

but with -d flag:
DB /home/kes/work/projects/perl_libs/Devel/KP.pm 41
main ./t3.pl 14  


I think this info is relative to described above:
I can not define in debugger module 'lsub' subroutine alone. It is not called 
at all (like that sub is not defined in DB package)
but if I add definition of ::sub the 'lsub' starts to work.

It seems perl internally do not apply all magic to '::lsub' as it do for 
'::sub'