Japhering has asked for the wisdom of the Perl Monks concerning the following question:

Trying to debug some object oriented code with perl 5.8.8 (yes, I know it is behind, but the only thing available to the RackSpace install in question).

The docs say I should be able in the debugger do

 b load /fully/qualified/path/to/file

Which should set a break point at the first executable line. It doesn't. So, I presuming that I've missed some small nuance that will make it work. Any one have any thoughts ?

Thanks

Mike

Replies are listed 'Best First'.
Re: debugger with b load "file" (WFM)
by tye (Sage) on Apr 30, 2012 at 20:49 UTC

    Works for me. I'd give you more details but that feels like putting the shoe on the wrong foot. That is, you should probably be the one giving more details because your case is the one that somebody cares about.

    - tye        

Re: debugger with b load "file"
by pemungkah (Priest) on Apr 30, 2012 at 23:24 UTC
    Is that file really and truly in your path? If so you should be able to just 'use path::to::file'. and then see if the file actually got loaded (an 'm' command on the class name will do). If the debugger never loads that exact file, it will not break at it either.
Re: debugger with b load "file"
by Japhering (Initiate) on May 01, 2012 at 19:55 UTC

    Ok.. I think I figured it out.

    I checked the paths and perms everything is where I expect it to be and has sufficient permissions to be read.

    I then took a walk through the source code and discovered that the module is being loaded inside an eval .. which I'm guessing is why the debugger never sees it load

    Thanks
      the module is being loaded inside an eval .. which I'm guessing is why the debugger never sees it load

      No, still works for me:

      $ perldoc -l File::Spec::Unix /usr/local/lib/perl5/5.8.4/File/Spec/Unix.pm $ perl -de 'eval { require File::Spec }' Loading DB routines from perl5db.pl version 1.25 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(-e:1): eval { require File::Spec } DB<1> b load /usr/local/lib/perl5/5.8.4/File/Spec/Unix.pm Will stop on load of `/usr/local/lib/perl5/5.8.4/File/Spec/Unix.pm'. DB<2> c '/usr/local/lib/perl5/5.8.4/File/Spec/Unix.pm' loaded... File::Spec::Unix::(/usr/local/lib/perl5/5.8.4/File/Spec/Unix.pm:6): 6: $VERSION = '1.5'; DB<2> q

      - tye