chdir 't' if -d 't';
@INC = '../lib';
require './test.pl';
- plan( tests => 31 );
+ plan( tests => 78 );
}
my @c;
sub pb { return (caller(0))[3] }
my $i = eval $debugger_test;
-is( $i, 10, "do not skip over eval (and caller returns 10 elements)" );
+is( $i, 11, "do not skip over eval (and caller returns 10 elements)" );
is( eval 'pb()', 'main::pb', "actually return the right function name" );
$^P = $saved_perldb;
$i = eval $debugger_test;
-is( $i, 10, 'do not skip over eval even if $^P had been on at some point' );
+is( $i, 11, 'do not skip over eval even if $^P had been on at some point' );
is( eval 'pb()', 'main::pb', 'actually return the right function name even if $^P had been on at some point' );
+print "# caller can now return the compile time state of %^H\n";
+
+sub hint_exists {
+ my $key = shift;
+ my $level = shift;
+ my @results = caller($level||0);
+ exists $results[10]->{$key};
+}
+
+sub hint_fetch {
+ my $key = shift;
+ my $level = shift;
+ my @results = caller($level||0);
+ $results[10]->{$key};
+}
+
+$::testing_caller = 1;
+
+do './op/caller.pl';