>This seems to better match expected usage and desirable properties. >Can anybody think of any good reason why the debugger should not >be fixed to work this way? (Actually, I've already got the patch, >but wanted to run the idea by the world first.) Well, I've heard nothing, so here's the patch that implements this. --- perl5db.pl-presig Tue Mar 14 18:42:13 2000 +++ perl5db.pl Wed Mar 15 06:23:49 2000 @@ -346,16 +346,24 @@ return 1; } -if (-f $rcfile) { - safe_do("./$rcfile"); -} -elsif (defined $ENV{HOME} && -f "$ENV{HOME}/$rcfile") { +{ + my @sb; # stat buff to check duplicate loading + if (defined $ENV{HOME} && -f "$ENV{HOME}/$rcfile") { + @sb = stat(_); safe_do("$ENV{HOME}/$rcfile"); -} -elsif (defined $ENV{LOGDIR} && -f "$ENV{LOGDIR}/$rcfile") { + } + elsif (defined $ENV{LOGDIR} && -f "$ENV{LOGDIR}/$rcfile") { + @sb = stat(_); safe_do("$ENV{LOGDIR}/$rcfile"); -} + } + if (-f $rcfile) { + if (@sb && $sb[0] != (stat _)[0] && $sb[1] != (stat _)[1]) { + safe_do("./$rcfile"); + } + } + +} if (defined $ENV{PERLDB_OPTS}) { parse_options($ENV{PERLDB_OPTS}); }Thread Previous