sub _handle_r_command {
my $self = shift;
+
# r - return from the current subroutine.
if ($self->_is_full('r')) {
my $self = shift;
# source - read commands from a file (or pipe!) and execute.
- if (my ($sourced_fn) = $DB::cmd =~ /\Asource\s+(.*\S)/) {
+ if (my $sourced_fn = $self->cmd_args) {
if ( open my $fh, $sourced_fn ) {
# Opened OK; stick it in the list of file handles.
sub _handle_save_command {
my $self = shift;
- if (my ($new_fn) = $DB::cmd =~ /\Asave\s*(.*)\z/) {
+ if (my $new_fn = $self->cmd_args) {
my $filename = $new_fn || '.perl5dbrc'; # default?
if ( open my $fh, '>', $filename ) {