all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Differences with perld amd cmdline perl -d
@ 2003-02-18 16:59 Harry Putnam
  2003-02-18 23:21 ` Harry Putnam
  0 siblings, 1 reply; 2+ messages in thread
From: Harry Putnam @ 2003-02-18 16:59 UTC (permalink / raw)


I notice a number of instances where running perld (perldebugger) from
emacs, give very different results from running perl -d at the
command line, on the same material.

Apparently something happens between emacs and terminal or somewhere
that changes things enough to get very different and somewhat useless
results. 

Rather than post long winded perl code, as example I'll just say the
command looks like:

  perl -d ./pdb.pl -l 6 7 -c <test.g 
at the perld prompt.

Running the command from the command line, the perl debugger steps
thru the code and shows no problems.

Running it in emacs, it enters a `while' loop and never leaves that
loop.

  while (<STDIN>) {
    chomp;
    print FILE_BK "
  }

Pressing `p "<$_>\n"  always reports a blank line
  <>

As you see, the loop is confined to STDIN which is why the file is
fed with `< test.g' syntax.  The script itself is intended to work only
in a pipe or with  `cmd < infile' syntax.

Apparently emacs is confused about what is STDIN and never sees the
end of it. I suspect something technical about how emacs sees the
command to be the problem.

But have also noticed many other instances where at the cmdline the
debugger works as expected, like setting a break point then pressing
`r' to get to it.

On some scripts (not all or even most).  The same proceedure in emacs
will not stop at the break point and just run right thru and finish,
maybe reporting problems.  So there must be certain things that are
seen differently when viewed thru the emacs layer compared to from the
command line.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Differences with perld amd cmdline perl -d
  2003-02-18 16:59 Differences with perld amd cmdline perl -d Harry Putnam
@ 2003-02-18 23:21 ` Harry Putnam
  0 siblings, 0 replies; 2+ messages in thread
From: Harry Putnam @ 2003-02-18 23:21 UTC (permalink / raw)


Harry Putnam <hgp@sbcglobal.net> writes:


Typo ALERT
>
>   while (<STDIN>) {
>     chomp;
>     print FILE_BK "
     ^^^^^^^^^^^^^^^
Should have been:
      push @input,$_;
>   }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-18 23:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-18 16:59 Differences with perld amd cmdline perl -d Harry Putnam
2003-02-18 23:21 ` Harry Putnam

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.