This queue is for tickets about the Devel-REPL CPAN distribution.

Report information
The Basics
Id:
57405
Status:
open
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
chm [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Wishlist
Broken in:
  • 1.003009
  • 1.003010
  • 1.003011
Fixed in:
(no value)



Subject: exit exits shell, not just program in shell
The problem is that Devel::REPL itself will exit when exit is run within the shell. I'm not sure if the solution here is to override the exit call itself or to put it an END {} block to handle clean up after the exit. For Devel::REPL::Plugin::ReadLineHistory, it is clear that at least the history file needs to be saved after the exit but before the REPL exits. Maybe the exit call should be replaced by a die that indicates it is an exit call. That could be caught by the eval of the shell.
On Tue May 11 22:44:59 2010, CHM wrote:
Show quoted text
> The problem is that Devel::REPL itself will exit > when exit is run within the shell. I'm not sure > if the solution here is to override the exit call > itself or to put it an END {} block to handle > clean up after the exit. > > For Devel::REPL::Plugin::ReadLineHistory, it is > clear that at least the history file needs to be > saved after the exit but before the REPL exits. > Maybe the exit call should be replaced by a die > that indicates it is an exit call. That could > be caught by the eval of the shell.
I've pushed to git a minor enhancement to Devel::REPL which adds an attribut to the REPL object exit_repl which, when set to true, causes the REPL loop to stop run-ing. --Chris
Given that there is now a clean way to request that the Devel::REPL shell exit, the problem with exit clobbering everything and the shell session is not so critical. It would be a nice feature to have but I'm not sure how the problem could be fixed. For now I've relegated it to "Wishlist" category with the new $_REPL->exit_repl(1) attribute.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.