#!/usr/bin/perl --
use strict;
use warnings;
print ASDF(19), "\n";
BEGIN {
my $a = 22;
sub ASDF {
my $b = $_[0] + 1;
$a + $b;
}
}
####
perl.exe -d pm.919064.1.pl
Default die handler restored.
Loading DB routines from perl5db.pl version 1.07
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(pm.919064.1.pl:4): print ASDF(19), "\n";
main::(pm.919064.1.pl:5): BEGIN {
DB<1> s
main::ASDF(pm.919064.1.pl:8): my $b = $_[0] + 1;
DB<1> x $a
0 22
DB<2> s
main::ASDF(pm.919064.1.pl:9): $a + $b;
DB<2> s
42
Debugged program terminated. Use q to quit or R to restart,
use O inhibit_exit to avoid stopping after program termination,
h q, h R or h O to get additional info.
DB<2> q
####
#!/usr/bin/perl --
use strict;
use warnings;
print ASDF(19), "\n";
BEGIN {
my $a = 22;
sub ASDF {
my $b = $_[0] + 1;
}
}
####
perl.exe -d pm.919064.2.pl
Default die handler restored.
Loading DB routines from perl5db.pl version 1.07
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(pm.919064.2.pl:4): print ASDF(19), "\n";
main::(pm.919064.2.pl:5): BEGIN {
DB<1> s
main::ASDF(pm.919064.2.pl:8): my $b = $_[0] + 1;
DB<1> x $a
0 undef
DB<2> s
20
Debugged program terminated. Use q to quit or R to restart,
use O inhibit_exit to avoid stopping after program termination,
h q, h R or h O to get additional info.
DB<2> q
####
#!/usr/bin/perl --
use strict;
use warnings;
print ASDF(19), "\n";
BEGIN {
my $a = 22;
$a += 0;
sub ASDF {
my $b = $_[0] + 1;
}
sub DADA { $a }
}
####
perl.exe -d pm.919064.4.pl
Default die handler restored.
Loading DB routines from perl5db.pl version 1.07
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(pm.919064.4.pl:4): print ASDF(19), "\n";
main::(pm.919064.4.pl:5): BEGIN {
DB<1> s
main::ASDF(pm.919064.4.pl:9): my $b = $_[0] + 1;
DB<1> x $a
0 undef
DB<2> s
20
Debugged program terminated. Use q to quit or R to restart,
use O inhibit_exit to avoid stopping after program termination,
h q, h R or h O to get additional info.
DB<2> q