Opened 10 years ago

Closed 9 years ago

#1036 closed defect (not a bug)

Debugged scripts can't find modules in the current directory

Reported by: dandv Owned by:
Priority: critical Milestone:
Component: Debugger for Perl 5 Version: 0.72
Keywords: debugger Cc:


When stepping into this script on Windows, Padre doesn't change to the correct directory, because the script can't find a module located in the same directory:

use strict;
use Cwd;

print getcwd(), "\n";  # wrong, getcwd() returns the My Documents directory

require Module;

print Module::foo(); exists in the same directory as the script:

package Module;

sub foo { 'bar' }


When run from the command line in c:\programs\perl, the script works as expected and prints


Change History (3)

comment:1 Changed 10 years ago by zenogantner

  • Keywords debugger added

comment:2 Changed 9 years ago by szabgab

  • Component changed from editor to Debugger for Perl 5

comment:3 Changed 9 years ago by bowtie

  • Resolution set to not a bug
  • Status changed from new to closed


is this still relevant in Debug2

had you considered using

use FindBin qw($Bin);
use lib ("$Bin");
Note: See TracTickets for help on using tickets.