You can also go into the debug shell (which is REPL) by giving it some valid statement: Here is an example:
shell> perl -de 1
This will take you into the perl debug shell (after evaluating the string "1" which is true).
shell> perl -de 1
This will take you into the perl debug shell (after evaluating the string "1" which is true).
$ my $x = sub { my $x = shift; return sub { $x . shift } }
$CODE1 = sub { # this is what is returned by Devel::REPL
package Devel::REPL::Plugin::Packages::DefaultScratchpad;
use warnings;
use strict 'refs';
my $x = shift @_;
return sub {
$x . shift(@_);
}
;
};
$ $x->('hello ')->('world');
hello world