http://qs1969.pair.com?node_id=11140580


in reply to Re^2: perl -d myprog autostarts - but only in one specific directory
in thread perl -d myprog autostarts - but only in one specific directory

Right but because things weren't misbehaving in other directories that was suggesting something wonky in a local startup config rather than the global user's. There's also packages (e.g. direnv) which setup environment variables specifically for different directories which could be in play. The con problem found earlier is most likely the culprit but things like this are worth keeping in mind.

The cake is a lie.
The cake is a lie.
The cake is a lie.

  • Comment on Re^3: perl -d myprog autostarts - but only in one specific directory
  • Download Code

Replies are listed 'Best First'.
Re^4: perl -d myprog autostarts - but only in one specific directory
by LanX (Saint) on Jan 19, 2022 at 00:17 UTC
    Doh ... the "con" bug is really frightening. I've never heard of this DOS feature, and expecting such side effects on Linux wouldn't occur to me.

    Anyway my point was there many ways to tweak/configure the debugger to act differently in different directories. It's even possible to redirect the call to a patched version "perl5db.pl" by changing the environment.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      expecting such side effects on Linux wouldn't occur to me.

      Windows bugs Linux even when it's nowhere near the machine: spookiest "action from a distance" I have seen.

      What's more dangerous is that (as far as I read, since I don't have any M$) there are ways to circumvent windows stopping you from creating a CON file and do create one, e.g. echo "test" > \\?\C:\Users\yourname\con . This is borrowed from https://www.reddit.com/r/programming/comments/g4vfp2/why_you_cant_name_a_file_con_in_windows_tom_scott/ and BE-WARNED that a) it is untested by me, and b) if you do create CON then you will have a hard time deleting it.

      In the link I cite above, they are also mentioning of pulling from a git repo with a CON file in it. And I add: what happens if a ZIP or TAR archive contains a CON file? Or, what if mounting an NTFS after booting from a linux live USB and dumping a CON in there. So, in theory, there are some ways to create a CON file which the M$ police will have a hard time catching.

      The big question is: how Perl is affected by this?