diff options
author | Shlomi Fish <shlomif@shlomifish.org> | 2011-09-04 12:29:59 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-09-04 17:17:19 -0700 |
commit | e09195afbb882765b006957aee1cc366505ea987 (patch) | |
tree | b86d16cec80014ccd0d752f0203e850b8e332ab3 /lib/perl5db | |
parent | 72b09cff8561f44fdff6ea0ff31492936aa30261 (diff) | |
download | perl-e09195afbb882765b006957aee1cc366505ea987.tar.gz |
Add enable/disable commands for breakpoints in perl -d
Diffstat (limited to 'lib/perl5db')
-rw-r--r-- | lib/perl5db/t/EnableModule.pm | 18 | ||||
-rw-r--r-- | lib/perl5db/t/disable-breakpoints-1 | 19 | ||||
-rw-r--r-- | lib/perl5db/t/disable-breakpoints-2 | 26 | ||||
-rw-r--r-- | lib/perl5db/t/disable-breakpoints-3 | 21 |
4 files changed, 84 insertions, 0 deletions
diff --git a/lib/perl5db/t/EnableModule.pm b/lib/perl5db/t/EnableModule.pm new file mode 100644 index 0000000000..910a6db84d --- /dev/null +++ b/lib/perl5db/t/EnableModule.pm @@ -0,0 +1,18 @@ +package EnableModule; + +use strict; +use warnings; + +sub set_x +{ + my $x_ref = shift; + + ${$x_ref} .= "TwoHundred"; + + my $x = ${$x_ref}; + + my $t = $x; + $t .= "Foo"; +} + +1; diff --git a/lib/perl5db/t/disable-breakpoints-1 b/lib/perl5db/t/disable-breakpoints-1 new file mode 100644 index 0000000000..10877d6156 --- /dev/null +++ b/lib/perl5db/t/disable-breakpoints-1 @@ -0,0 +1,19 @@ +#!/usr/bin/perl +my $x = "One"; +my $dummy = 0; + +$x = "FirstVal"; + +$dummy++; + +$x = "SecondVal"; + +$dummy++; + +$x = "ThirdVal"; + +$dummy++; + +$x = "FourthVal"; + +$dummy++; diff --git a/lib/perl5db/t/disable-breakpoints-2 b/lib/perl5db/t/disable-breakpoints-2 new file mode 100644 index 0000000000..a3ab166958 --- /dev/null +++ b/lib/perl5db/t/disable-breakpoints-2 @@ -0,0 +1,26 @@ +#!/usr/bin/perl +my $x = "One"; + +$x = "FirstVal"; + +set_x(); + +$x = "SecondVal"; + +set_x(); + +$x = "ThirdVal"; + +set_x(); + +$x = "FourthVal"; + +set_x(); + +sub set_x +{ + $x .= "OneHundred"; + + my $t = $x; + $t .= "Foo"; +} diff --git a/lib/perl5db/t/disable-breakpoints-3 b/lib/perl5db/t/disable-breakpoints-3 new file mode 100644 index 0000000000..990abb11eb --- /dev/null +++ b/lib/perl5db/t/disable-breakpoints-3 @@ -0,0 +1,21 @@ +#!/usr/bin/perl + +use EnableModule; +my $x = "One"; + +$x = "FirstVal"; + +EnableModule::set_x(\$x); + +$x = "SecondVal"; + +EnableModule::set_x(\$x); + +$x = "ThirdVal"; + +EnableModule::set_x(\$x); + +$x = "FourthVal"; + +EnableModule::set_x(\$x); + |