Permalink
Browse files

DB::LineCache.pm, Location.pm: Redo the way we look for unfinished so…

…urce lines. Command/*.pm; add Boldening in command syntax.

Build.PL: Use "use lib" rather than "use rlib".
  • Loading branch information...
1 parent d33568b commit 626dc4aac2122c9e36d08d3ce713f32d683e6c4b Rocky Bernstein committed Sep 17, 2012
View
45 Build.PL
@@ -20,8 +20,12 @@ use Module::Build;
use Config;
use File::Basename;
use File::Spec;
-my $dirname = dirname(__FILE__);
-use rlib 'lib';
+
+our $dirname;
+BEGIN {
+ $dirname = dirname(__FILE__);
+};
+use lib $dirname;
use Devel::Trepan;
my $release_status = ($Devel::Trepan::VERSION =~ /_/) ? 'testing' : 'stable';
@@ -39,41 +43,40 @@ my $builder = Module::Build->new(
release_status => $release_status,
meta_merge => {
- resources => {
- bugtracker => 'https://github.com/rocky/Perl-Devel-Trepan/issues',
- repository => 'http://github.com/rocky/Perl-Devel-Trepan'
- }
+ resources => {
+ bugtracker => 'https://github.com/rocky/Perl-Devel-Trepan/issues',
+ repository => 'http://github.com/rocky/Perl-Devel-Trepan'
+ }
},
configure_requires => {
- 'Module::Build' => '0.32',
-
+ 'Module::Build' => '0.32',
+
},
build_requires => {
- 'rlib' => '0.02',
# 'String::Diff' => 0,
},
test_requires => {
'Test::More' => '0.81',
},
recommends => {
- 'Data::Printer' => 0,
- 'Devel::Callsite' => 0,
- 'Eval::WithLexicals' => 0,
- 'Pod::Text::Color' => 2.06,
- 'Term::ReadKey' => 0,
- 'Term::ReadLine::Perl' => 0,
+ 'Data::Printer' => 0,
+ 'Devel::Callsite' => 0,
+ 'Eval::WithLexicals' => 0,
+ 'Pod::Text::Color' => 2.06,
+ 'Term::ReadKey' => 0,
+ 'Term::ReadLine::Perl' => 0,
},
requires => {
- 'perl' => '5.008008',
- 'Array::Columnize' => '1.01',
- # 'Capture::Tiny' => 0,
- 'Data::Dumper' => 0,
- 'Getopt::Long' => '2.36',
+ 'perl' => '5.008008',
+ 'Array::Columnize' => '1.01',
+ # 'Capture::Tiny' => 0,
+ 'Data::Dumper' => 0,
+ 'Getopt::Long' => '2.36',
'Digest::SHA' => 0,
'PadWalker' => 0,
- 'Pod::Text' => 3.13,
+ 'Pod::Text' => 3.13,
'Syntax::Highlight::Perl::Improved' => 0,
'rlib' => '0.02',
'version' => 0,
View
17 META.json
@@ -14,6 +14,11 @@
},
"name" : "Devel-Trepan",
"prereqs" : {
+ "build" : {
+ "requires" : {
+ "rlib" : "0.02"
+ }
+ },
"configure" : {
"requires" : {
"Module::Build" : "0.32"
@@ -24,7 +29,7 @@
"Data::Printer" : "0",
"Devel::Callsite" : "0",
"Eval::WithLexicals" : "0",
- "Pod::Text::Color" : "0",
+ "Pod::Text::Color" : "2.06",
"Term::ReadKey" : "0",
"Term::ReadLine::Perl" : "0"
},
@@ -34,7 +39,7 @@
"Digest::SHA" : "0",
"Getopt::Long" : "2.36",
"PadWalker" : "0",
- "Pod::Text" : "0",
+ "Pod::Text" : "3.13",
"Syntax::Highlight::Perl::Improved" : "0",
"perl" : "5.008008",
"rlib" : "0.02",
@@ -57,7 +62,7 @@
},
"Devel::Trepan" : {
"file" : "lib/Devel/Trepan.pm",
- "version" : "0.36"
+ "version" : "0.37_01"
},
"Devel::Trepan::BrkptMgr" : {
"file" : "lib/Devel/Trepan/BrkptMgr.pm",
@@ -633,7 +638,7 @@
},
"Devel::Trepan::Options" : {
"file" : "lib/Devel/Trepan/Options.pm",
- "version" : 0
+ "version" : "0.37"
},
"Devel::Trepan::Pod2Text" : {
"file" : "lib/Devel/Trepan/Pod2Text.pm",
@@ -668,7 +673,7 @@
"version" : 0
}
},
- "release_status" : "stable",
+ "release_status" : "testing",
"resources" : {
"bugtracker" : {
"web" : "https://github.com/rocky/Perl-Devel-Trepan/issues"
@@ -680,5 +685,5 @@
"url" : "http://github.com/rocky/Perl-Devel-Trepan"
}
},
- "version" : "0.36"
+ "version" : "0.37_01"
}
View
13 META.yml
@@ -2,7 +2,8 @@
abstract: "Modular Perl Debugger (akin to Ruby \"Trepanning\" Debuggers)."
author:
- 'Rocky Bernstein <rocky@cpan.org>'
-build_requires: {}
+build_requires:
+ rlib: 0.02
configure_requires:
Module::Build: 0.32
dynamic_config: 1
@@ -24,7 +25,7 @@ provides:
version: 0
Devel::Trepan:
file: lib/Devel/Trepan.pm
- version: 0.36
+ version: 0.37_01
Devel::Trepan::BrkptMgr:
file: lib/Devel/Trepan/BrkptMgr.pm
version: 0
@@ -456,7 +457,7 @@ provides:
version: 0
Devel::Trepan::Options:
file: lib/Devel/Trepan/Options.pm
- version: 0
+ version: 0.37
Devel::Trepan::Pod2Text:
file: lib/Devel/Trepan/Pod2Text.pm
version: 0
@@ -485,7 +486,7 @@ recommends:
Data::Printer: 0
Devel::Callsite: 0
Eval::WithLexicals: 0
- Pod::Text::Color: 0
+ Pod::Text::Color: 2.06
Term::ReadKey: 0
Term::ReadLine::Perl: 0
requires:
@@ -494,7 +495,7 @@ requires:
Digest::SHA: 0
Getopt::Long: 2.36
PadWalker: 0
- Pod::Text: 0
+ Pod::Text: 3.13
Syntax::Highlight::Perl::Improved: 0
perl: 5.008008
rlib: 0.02
@@ -503,4 +504,4 @@ resources:
bugtracker: https://github.com/rocky/Perl-Devel-Trepan/issues
license: http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt
repository: http://github.com/rocky/Perl-Devel-Trepan
-version: 0.36
+version: 0.37_01
View
1 example/eval.pl
@@ -1,4 +1,5 @@
$var = '
+# This line is not a comment of the above $var assignment
$x = 2;
$y = 3;
$z = 4';
View
6 lib/Devel/Trepan.pm
@@ -8,7 +8,7 @@ package Devel::Trepan;
use strict;
use warnings;
use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
-use version; $VERSION = '0.37';
+use version; $VERSION = '0.37_01';
use Exporter;
use Devel::Trepan::Core;
@@ -272,7 +272,7 @@ B<quit>[B<!>] [B<unconditionally>] [I<exit-code>]
Gently exit the debugger and debugged program.
The program being debugged is exited via I<exit()> which runs the Kernel
-at_exit finalizers. If a return code is given, that is the return code
+I<at_exit> finalizers. If a return code is given, that is the return code
passed to I<exit()> - presumably the return code that will be passed back
to the OS. If no exit code is given, 0 is used.
@@ -568,7 +568,7 @@ L</"Move to a less recent frame (down)">
=back
-=head4 Print a backtrace (backtrace)
+=head4 Print call stack (backtrace)
B<backtrace> [I<count>]
View
2 lib/Devel/Trepan/CmdProcessor/Command/Backtrace.pm
@@ -24,7 +24,7 @@ our $NAME = set_name();
our $HELP = <<"HELP";
=pod
-backtrace [I<count>]
+B<backtrace> [I<count>]
Print a stack trace, with the most recent frame at the top. With a
positive number, print at most many entries.
View
2 lib/Devel/Trepan/CmdProcessor/Command/Break.pm
@@ -28,7 +28,7 @@ our $NAME = set_name();
our $HELP = <<'HELP';
=pod
-break [I<location>] [if I<condition>]
+B<break> [I<location>] [B<if> I<condition>]
Set a breakpoint. If I<location> is given use the current stopping
point. An optional condition may be given.
View
2 lib/Devel/Trepan/CmdProcessor/Command/Condition.pm
@@ -28,7 +28,7 @@ our $NAME = set_name();
our $HELP = <<'HELP';
=pod
-condition I<bp-number> I<Perl-expression>
+B<condition> I<bp-number> I<Perl-expression>
I<bp-number> is a breakpoint number. I<Perl-expresion> is a Perl
expression which must evaluate to true before the breakpoint is
View
2 lib/Devel/Trepan/CmdProcessor/Command/Debug.pm
@@ -28,7 +28,7 @@ our $NAME = set_name();
our $HELP = <<'HELP';
=pod
-debug I<Perl-code>
+B<debug> I<Perl-code>
Recursively debug I<Perl-code>.
View
2 lib/Devel/Trepan/CmdProcessor/Command/Delete.pm
@@ -26,7 +26,7 @@ our $NAME = set_name();
our $HELP = <<'HELP';
=pod
-delete [I<bp-number> [I<bp-number>...]]
+B<delete> [I<bp-number> [I<bp-number>...]]
Delete some breakpoints.
View
2 lib/Devel/Trepan/CmdProcessor/Command/Disable.pm
@@ -34,7 +34,7 @@ our $NAME = set_name();
our $HELP = <<'HELP';
=pod
-disable I<bp-number> [I<bp-number> ...]
+B<disable> I<bp-number> [I<bp-number> ...]
Disables the breakpoints given as a space separated list of breakpoint
numbers. See also C<info break> to get a list of breakpoints
View
2 lib/Devel/Trepan/CmdProcessor/Command/Down.pm
@@ -23,7 +23,7 @@ our $NAME = set_name();
our $HELP = <<'HELP';
=pod
-down [I<count>]
+B<down> [I<count>]
Move the current frame down in the stack trace (to a newer frame). 0
is the most recent frame. If no count is given, move down 1.
View
2 lib/Devel/Trepan/CmdProcessor/Command/Enable.pm
@@ -32,7 +32,7 @@ our $NAME = set_name();
our $HELP = <<"HELP";
=pod
-enable I<num> [I<num> ...]
+B<enable> I<num> [I<num> ...]
Enables breakpoints, watch expressions or actions given as a space
separated list of numbers which may be prefaces with an 'a', 'b', or 'w'.
View
2 lib/Devel/Trepan/CmdProcessor/Command/Eval.pm
@@ -26,7 +26,7 @@ our $NAME = set_name();
our $HELP = <<'HELP';
=pod
-eval[@$][?] [I<Perl-code>]
+B<eval>[B<@$>][B<?>] [I<Perl-code>]
Run I<Perl-code> in the context of the current frame.
View
2 lib/Devel/Trepan/CmdProcessor/Command/Frame.pm
@@ -25,7 +25,7 @@ our $NAME = set_name();
our $HELP = <<"HELP";
=pod
-frame [I<frame-number>]
+B<frame> [I<frame-number>]
Change the current frame to frame I<frame-number> if specified, or the
most-recent frame, 0, if no frame number specified.
View
2 lib/Devel/Trepan/CmdProcessor/Command/Kill.pm
@@ -29,7 +29,7 @@ our $NAME = set_name();
our $HELP = <<'HELP';
=pod
-kill[!] [I<signal-number>|I<signal-name>]
+B<kill>[B<!>] [I<signal-number>|I<signal-name>]
Kill execution of program being debugged.
View
2 lib/Devel/Trepan/CmdProcessor/Command/Quit.pm
@@ -25,7 +25,7 @@ our $NAME = set_name();
our $HELP = <<'HELP';
=pod
-quit[!] [unconditionally] [I<exit-code>]
+B<quit>[B<!>] [B<unconditionally>] [I<exit-code>]
Gently exit the debugger and debugged program.
View
2 lib/Devel/Trepan/CmdProcessor/Command/TBreak.pm
@@ -28,7 +28,7 @@ our $NAME = set_name();
our $HELP = <<'HELP';
=pod
-tbreak [I<location>]
+B<tbreak> [I<location>]
Set a one-time breakpoint. The breakpoint is removed after it is hit.
If no location is given use the current stopping point.
View
2 lib/Devel/Trepan/CmdProcessor/Command/Up.pm
@@ -28,7 +28,7 @@ our $NAME = set_name();
our $HELP = <<'HELP';
=pod
-up [I<count>]
+B<up> [I<count>]
Move the current frame up in the stack trace (to an older frame). 0 is
the most recent frame. If no count is given, move up 1.
View
29 lib/Devel/Trepan/CmdProcessor/Location.pm
@@ -63,34 +63,12 @@ sub min($$) {
sub current_source_text(;$)
{
my ($self, $opts) = @_;
- $opts = {} unless defined $opts;
+ $opts = {max_continue => 5} unless defined $opts;
my $filename = $self->{frame}{file};
my $line_number = $self->{frame}{line};
my $text = (DB::LineCache::getline($filename, $line_number, $opts))
|| '';
chomp($text);
- my $max_show_lines = $opts->{max_lines} || 4;
- my $max_line = min($line_number + $max_show_lines - 1,
- DB::LineCache::size($filename));
- my $raw_opts = {output => 'plain'};
-
- # Accumulate lines if we think this line continues to the
- # next. This code from newer perl5db is a bit heuristic, but
- # overall it is probably helpful.
- for ( my $i = $line_number + 1;
- $i <= $max_line && !DB::LineCache::is_trace_line($filename, $i);
- $i++ ) {
- my $new_line =
- (DB::LineCache::getline($filename, $i, $opts)) || '';
- my $raw_text = DB::LineCache::getline($filename, $i) || '';
-
- # Drop out on null statements, block closers, and comments.
- # This could however still be wrong if we have these inside a
- # string. Also we might erroneously list function prototypes
- # and headers, but this is probably harmless.
- last if $raw_text =~ /^\s*([\;\}\#\n]|$)/;
- $text .= ("\n" . $new_line);
- }
return $text;
}
@@ -165,7 +143,10 @@ sub format_location($;$$$)
sub print_location($;$)
{
my ($self,$opts) = @_;
- $opts = {output => $self->{settings}{highlight}} unless defined $opts;
+ $opts = {
+ output => $self->{settings}{highlight},
+ max_continue => 5,
+ } unless defined $opts;
my $loc = $self->format_location;
$self->msg(${loc});
View
2 lib/Devel/Trepan/DB/Eval.pm
@@ -107,7 +107,7 @@ sub eval_with_return {
sub eval_not_ok ($)
{
my $code = shift;
- my $wrapped = sprintf "$DB::namespace_package; sub { $code }";
+ my $wrapped = "$DB::namespace_package; sub { $code }";
no strict;
eval $wrapped;
if ($@) {
View
111 lib/Devel/Trepan/DB/LineCache.pm
@@ -37,6 +37,25 @@ use Digest::SHA;
use version; $VERSION = '0.1.1';
+package DB;
+# =pod
+#
+# I<eval_ok($code)> => I<boolean>
+#
+# Evaluate I<$code> and return true if there's no error.
+# =cut
+sub eval_ok ($)
+{
+ my $code = shift;
+ no strict; no warnings;
+ $DB::namespace_package = 'package main' unless $DB::namespace_package;
+ my $wrapped = "$DB::namespace_package; sub { $code }";
+ eval $wrapped;
+ # print $@, "\n" if $@;
+ return !$@;
+}
+
+
# A package to read and cache lines of a Perl program.
package DB::LineCache;
use English qw( -no_match_vars );
@@ -247,7 +266,9 @@ sub file_list()
sort((cached_files(), keys(%file2file_remap)));
}
-# Get line +line_number+ from file named +filename+. Return undef if
+# =pod
+
+# Get line C<line_number> from file named C<filename>. Return I<undef> if
# there was a problem. If a file named filename is not found, the
# function will look for it in the $: array.
#
@@ -258,6 +279,7 @@ sub file_list()
# $: << '/tmp'
# $lines = LineCache.getlines('myfile.rb')
#
+# =cut
sub getline($$;$)
{
my ($file_or_script, $line_number, $opts) = @_;
@@ -266,19 +288,40 @@ sub getline($$;$)
my $filename = map_file($file_or_script);
($filename, $line_number) = map_file_line($filename, $line_number);
my $lines = getlines($filename, $opts);
- if (defined $lines && @$lines && $line_number > 0 &&
- $line_number <= scalar @$lines) {
- my $line = $lines->[$line_number-1];
+ # Adjust for 0-origin arrays vs 1 origin line numbers
+ my $max_index = scalar(@$lines) - 1;
+ my $index = $line_number - 1;
+ if (defined $lines && @$lines && $index >= 0 && $index <= $max_index) {
+ my $max_continue = $opts->{max_continue} || 1;
+ my $line = $lines->[$index];
+ return undef unless defined $line;
+ if ($max_continue > 1) {
+ my $plain_lines = getlines($filename, {output => 'plain'});
+ # FIXME: should cache results
+ my $sep = ($plain_lines eq $lines) ? '' : "\n";
+ my $plain_line = $plain_lines->[$index];
+ while (--$max_continue && !DB::eval_ok($plain_line)) {
+ $line .= ($sep . $lines->[++$index]);
+ $plain_line .= $plain_lines->[$index];
+ }
+ }
chomp $line if defined $line;
return $line;
} else {
return undef;
}
}
-# Read lines of +filename+ and cache the results. However +filename+ was
-# previously cached use the results from the cache. Return undef
-# if we can't get lines
+# =pod
+#
+# I<getlines($filename, [$opts]) => $string
+#
+# Read lines of I<$filename> and cache the results. However
+# if I<$filename> was previously cached use the results from the
+# cache. Return I<undef> if we can't get lines.
+#
+#=cut
+
sub getlines($;$);
sub getlines($;$)
{
@@ -339,7 +382,13 @@ sub highlight_string($)
$string;
}
- # Return full filename path for filename
+# =pod
+#
+# I<path($filename)
+#
+# Return full filename path for C<$filename>.
+#
+# =cut
sub path($)
{
my $filename = shift;
@@ -355,9 +404,14 @@ sub remap_file($$)
cache_file($to_file);
}
+# =pod
+#
+# I<remap_dbline_to_file()>
+#
# When we run trepan.pl -e ... or perl -d:Trepan -e ... we have data
# in internal "line" array @DB::dbline but no external file. Here we will
# create a temporary file and store the data in that.
+# =cut
sub remap_dbline_to_file()
{
my ($fh, $tempfile) = tempfile('XXXX', SUFFIX=>'.pl',
@@ -384,8 +438,13 @@ sub remap_file_lines($$$$)
# they intersect or one encompasses another.
push @$ary_ref, [$from_file, @range, $start];
}
-
-# Return SHA1 of filename.
+
+# =pod
+#
+# I<sha1($filename)> => I<string>
+#
+# Return SHA1 of <$filename>.
+# =cut
sub DB::LineCache::sha1($)
{
my $filename = shift;
@@ -403,7 +462,12 @@ sub DB::LineCache::sha1($)
$sha1->hexdigest;
}
-# Return the number of lines in filename
+# =pod
+#
+# I<size($filename_or_script)> => I<string>
+#
+# Return the number of lines in I<$filename_or_script>.
+# =cut
sub size($)
{
my $file_or_script = shift;
@@ -719,15 +783,26 @@ unless (caller) {
filename_is_eval(__FILE__);";
printf("filename_is_eval: %s, %d\n", __FILE__, filename_is_eval(__FILE__));
printf("filename_is_eval: %s, %d\n", '-e', filename_is_eval('-e'));
- exit;
+
+ #$DB::filename = 'bogus';
+ #eval {
+ # print '+++', is_cached_script(__FILE__), "\n";
+ #};
$lines_aref = getlines(__FILE__, {output=>'term'});
- print("trace nums again: ", join(', ',
- trace_line_numbers(__FILE__)),
- "\n");
- $DB::filename = 'bogus';
- eval "update_script_cache(__FILE__, {});
- print '+++', is_cached_script(__FILE__), \"\\n\"";
+ # print("trace nums again: ", join(', ',
+ # trace_line_numbers(__FILE__)),
+ # "\n");
+ $line = getline(__FILE__, __LINE__,
+ {output=>'term',
+ max_continue => 6});
+ print '-' x 30, "\n";
+ print "$line\n";
+ $line = getline(__FILE__, __LINE__,
+ {output=>'plain',
+ max_continue => 5});
+ print '-' x 30, "\n";
+ print "$line\n";
}
1;
View
8 t/10test-linecache.t
@@ -40,6 +40,14 @@ DB::LineCache::remap_file('another_name', __FILE__);
my $another_line = DB::LineCache::getline('another_name', $line_number);
is($another_line, $expected_line, "Test getline via remap_file");
+$expected_line = "\$line = DB::LineCache::getline(__FILE__, __LINE__,
+ {max_continue => 4}
+ );";
+$line = DB::LineCache::getline(__FILE__, __LINE__,
+ {max_continue => 4}
+ );
+is($line, $expected_line, "Test multi-spanning getline line");
+
# printf "Files cached: %s\n", join(', ', DB::LineCache::cached_files);
# DB::LineCache::update_cache(__FILE__);
## DB::LineCache::checkcache(__FILE__);
View
4 t/20test-eval.t
@@ -44,8 +44,8 @@ $opts = {
} else {
s/\((?:.+\/)?(.+\:\d+)\)/($1)/;
}
- } elsif (/`\(eval \d+\)\[.+:12\]'/) {
- s/`\(eval \d+\)\[.+:12\]'/`(eval 1000)[eval.pl:12]'/;
+ } elsif (/`\(eval \d+\)\[.+:13\]'/) {
+ s/`\(eval \d+\)\[.+:13\]'/`(eval 1000)[eval.pl:13]'/;
} elsif (/^sub five/) {
# Perl 5.10.0 doesn't show "sub five() {"
$skip = 3;
View
2 t/data/debug.right
@@ -8,7 +8,6 @@ Eval result display style is dumper.
$DB::D[0] = <undef>
-- main::((eval 1955)[Eval.pm:73]:6 remapped bogus.pl:6)
$DB::in_debugger=0;
-gcd(1,1)
-- main::(gcd.pl:9)
my ($a, $b) = @_;
-- main::(gcd.pl:11)
@@ -27,7 +26,6 @@ die sprintf "Need two integer arguments, got %d", scalar(@ARGV) unless
$DB::D[3] = <undef>
-- main::((eval 1955)[Eval.pm:73]:6 remapped bogus.pl:6)
$DB::in_debugger=0;
-gcd(1,1)
-- main::(gcd.pl:9)
my ($a, $b) = @_;
-- main::(gcd.pl:11)
View
65 t/data/eval2.right
@@ -2,55 +2,52 @@
++
-- main::(eval.pl:1)
$var = '
+# This line is not a comment of the above $var assignment
$x = 2;
$y = 3;
$z = 4';
Eval result display style is dumper.
set auto eval is on.
eval.pl [1-10]
1 -> $var = '
- 2 $x = 2;
- 3 $y = 3;
- 4 $z = 4';
- 5 eval $var;
- 6 $eval_sub='
- 7 sub five() {
- 8 my @args = @_;
- 9 print "ho\n";
- 10 5;
--- main::(eval.pl:5)
+ 2 # This line is not a comment of the above $var assignment
+ 3 $x = 2;
+ 4 $y = 3;
+ 5 $z = 4';
+ 6 eval $var;
+ 7 $eval_sub='
+ 8 sub five() {
+ 9 my @args = @_;
+ 10 print "ho\n";
+-- main::(eval.pl:6)
eval $var;
$DB::D[0] = 1
-eval.pl [1-10]
- 1 $var = '
- 2 $x = 2;
- 3 $y = 3;
- 4 $z = 4';
- 5 -> eval $var;
- 6 $eval_sub='
- 7 sub five() {
- 8 my @args = @_;
- 9 print "ho\n";
- 10 5;
+eval.pl [2-11]
+ 2 # This line is not a comment of the above $var assignment
+ 3 $x = 2;
+ 4 $y = 3;
+ 5 $z = 4';
+ 6 -> eval $var;
+ 7 $eval_sub='
+ 8 sub five() {
+ 9 my @args = @_;
+ 10 print "ho\n";
+ 11 5;
$DB::D[1] = 1
--- main::((eval 1955)[eval.pl:10]:2 remapped bogus.pl:2)
-
-$x = 2;
-$y = 3;
-$z = 4
-- main::((eval 1955)[eval.pl:10]:3 remapped bogus.pl:3)
-$x = 2;
-$y = 3;
-$z = 4
+# This line is not a comment of the above $var assignment
-- main::((eval 1955)[eval.pl:10]:4 remapped bogus.pl:4)
+$x = 2;
+-- main::((eval 1955)[eval.pl:10]:5 remapped bogus.pl:5)
$y = 3;
-$z = 4
--- main::(eval.pl:6)
+-- main::(eval.pl:7)
$eval_sub='
-eval $eval_sub;
-- main::(eval.pl:13)
+eval $eval_sub;
+-- main::(eval.pl:14)
$y = five();
-- main::((eval 1955)[eval.pl:10]:3 remapped bogus.pl:3)
+}
--> #0 @ = main::five() in
- file `(eval 1000)[eval.pl:12]' at line 3
- #1 file `eval.pl' at line 13
+ file `(eval 1000)[eval.pl:13]' at line 3
+ #1 file `eval.pl' at line 14
View
1 t/data/my.right
@@ -1,6 +1,5 @@
-- main::(my.pl:3)
my $a = 100;
-sub bar($) {
Eval result display style is dumper.
set auto eval is on.
*** No 'my' variable $a found at this level
View
1 t/data/next2.right
@@ -2,7 +2,6 @@
init();
-- main::(next2.pl:6)
my $y=3;
-sub init() {
Eval result display style is dumper.
$DB::D[0] = next2.pl
$DB::D[1] = 1.0

0 comments on commit 626dc4a

Please sign in to comment.