Windows Monks - has anyone gotten the Perl Debugger rcfile (.perldb / perldb.ini) to work on Windows? I can use the Perl debugger fine with 'perl -d <progfile> [args]', but if I have a .perldb (perldb.ini) file defined, I get mixed, unsatisfying results.

I'm on Windows 7 x64 with Strawberry 5.18.1.

Essentially I've tried .perldb and perldb.ini in both the current directory and my home directory. It seems only perldb.ini is recognized and when it finds it, regardless of location, I get the error:

perldb: Must not source insecure rcfile ./perldb.ini. You or the superuser must be the owner, and it must not be writable by anyone but its owner.

So I've tried to modify permissions of the perldb.ini file on Windows by breaking the parent inheritance on that file and making sure I'm the owner and the only one with "Full Permissions" - which still doesn't fix the problem.

The following transcript shows perldb.ini in current directory with the error, then moved to .perldb and no error, but no execution. Then moved .perldb to my home directory and the same as previous; finally moved .perldb to perldb.ini in home directory with the error again.

VinsWorldcom@C:\Users\VinsWorldcom\PerlDBTest> ls Directory of C:\Users\VinsWorldcom\PerlDBTest [.] [..] perldb.ini 1 File(s) 0 bytes VinsWorldcom@C:\Users\VinsWorldcom\PerlDBTest> perl -de 1 perldb: Must not source insecure rcfile ./perldb.ini. You or the superuser must be the owner, and it must not be writable by anyone but its owner. Loading DB routines from perl5db.pl version 1.39_10 Editor support available. Enter h or 'h h' for help, or 'perldoc perldebug' for more help. main::(-e:1): 1 DB<1> q VinsWorldcom@C:\Users\VinsWorldcom\PerlDBTest> mv perldb.ini .perldb 1 file(s) moved. VinsWorldcom@C:\Users\VinsWorldcom\PerlDBTest> perl -de 1 Loading DB routines from perl5db.pl version 1.39_10 Editor support available. Enter h or 'h h' for help, or 'perldoc perldebug' for more help. main::(-e:1): 1 DB<1> q VinsWorldcom@C:\Users\VinsWorldcom\PerlDBTest> mv .perldb .. 1 file(s) moved. VinsWorldcom@C:\Users\VinsWorldcom\PerlDBTest> perl -de 1 Loading DB routines from perl5db.pl version 1.39_10 Editor support available. Enter h or 'h h' for help, or 'perldoc perldebug' for more help. main::(-e:1): 1 DB<1> q VinsWorldcom@C:\Users\VinsWorldcom\PerlDBTest> mv ..\.perldb ..\perldb +.ini 1 file(s) moved. VinsWorldcom@C:\Users\VinsWorldcom\PerlDBTest> perl -de 1 perldb: Must not source insecure rcfile C:\Users\VinsWorldcom/perldb.i +ni. You or the superuser must be the owner, and it must not be writable by anyone but its owner. Loading DB routines from perl5db.pl version 1.39_10 Editor support available. Enter h or 'h h' for help, or 'perldoc perldebug' for more help. main::(-e:1): 1 DB<1> q VinsWorldcom@C:\Users\VinsWorldcom\PerlDBTest>

Anyone get this working successfully?

UPDATE: I've narrowed it down in perl5db.pl.

'use vars qw($rcfile);' does a check which for Windows will return 'perldb.ini' regardless explaining why '.perldb' has no effect, despite POD about running interactive vs non- mode.

Then, that 'perldb.ini' file is (eventually) run through "sub is_safe_file" which does a 'stat()' and on Windows, is obviously not returning the proper value to create a false when bit-masked with 022. See the function in perl5db.pl for more details as well as POSIX::S_ISDIR() with $stat->mode values from Windows vs. Linux, which has the mode value I'm getting "33206" on Windows.

That being said, I could do all sorts of things to fix this by editing perl5db.pl, but is there a way / argument /something to get this to work without me monkeying with a module's code?


In reply to Perl Debugger rcfile on Windows by VinsWorldcom

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.