Lines Matching defs:eval

64 The debugger uses this trick a I<lot>. Of particular note is C<DB::eval>, 
65 which lets the debugger get control inside of C<eval>'ed code. The debugger
67 keep C<$@> safe until it C<DB::eval> returns, at which point the previous
69 track of C<$@> inside C<eval>s which C<eval> other C<eval's>.
280 The item to be eval'ed by C<DB::eval>. Used to prevent messing with the current
281 contents of C<@_> when C<DB::eval> is called.
285 Determines what messages (if any) will get printed when a subroutine (or eval)
300 =item * 16 - Adds C<I<context> return from I<subname>: I<value>> messages on subroutine/eval exit. Ignored if C<4> is is not on.
317 Controls what (if anything) C<DB::eval()> will print after evaluating an
501 =head2 C<DB::eval()>
503 This function replaces straight C<eval()> inside the debugger; it simplifies
512 and the user's current package) and a add a newline before we do the C<eval()>.
513 This causes the proper context to be used when the eval is actually done.
520 considered sane by the debugger. If there was an C<eval()> error, we print
523 'methods'. Setting it to something else causes the debugger to do the eval
528 In any case, we then return the list of output from C<eval> to the caller,
532 =head3 Parameters and variables influencing execution of DB::eval()
534 C<DB::eval> isn't parameterized in the standard way; this is to keep the
535 debugger's calls to C<DB::eval()> from mucking with C<@_>, among other things.
536 The variables listed below influence C<DB::eval()>'s execution directly.
540 =item C<$evalarg> - the thing to actually be eval'ed
552 The following variables are altered by C<DB::eval()> during its execution. They
553 are "stacked" via C<local()>, enabling recursive calls to C<DB::eval()>.
557 =item C<@res> - used to capture output from actual C<eval>.
573 The context of C<DB::eval()> presents us with some problems. Obviously,
575 the eval, but we need some way to control how punctuation variables and
578 We can't use local, because the code inside C<DB::eval> can see localized
596 sub eval {
604 # even if the eval'ed code changes them, we can put them back again.
607 # inside the eval(), and we want to try to stay safe.
612 # Untaint the incoming eval() argument.
616 # "set up the context for DB::eval ..."
619 eval "$usercontext $evalarg;\n"; # '\n' for nice recursive debug
634 eval { &DB::save };
655 } ## end sub eval
897 # + watch val joined out of eval()
1157 : eval { require Config } && defined $Config::Config{pager}
1191 # If we didn't get a default for the length of eval/stack trace args,
1269 # eval the contents. But then the silly thing gets
1741 # set up the context for DB::eval, so it can properly execute
1743 # code is eval'ed in the proper package (not in the debugger!).
1768 # It's a conditional stop; eval it in the user's context and
1772 &eval;
1785 local $onetimeDump; # Tell DB::eval() to not output results
1787 # Fix context DB::eval() wants to return an array, but
1790 join ( "', '", &eval );
1891 # Set the DB::eval context appropriately.
1949 # in eval'ed text, for instance.
1975 $evalarg = $action, &eval if $action;
1985 &eval;
2111 # if something goes loco during the alias eval.
2115 # This is a command, so we eval it in the DEBUGGER's
2119 eval "\$cmd =~ $alias{$i}";
2231 eval {
2258 Hands the expression off to C<DB::eval>, setting it up to print the value
2263 $cmd =~ s/^x\b/ / && do { # Remainder gets done by DB::eval()
2284 # m expr - set up DB::eval to do the work
2285 $cmd =~ s/^m\b/ / && do { # Rest gets done by DB::eval()
2409 eval { require PadWalker; PadWalker->VERSION(0.08) }
2427 my $h = eval { PadWalker::peek_my(($1 || 0) + 1) };
2716 # In an eval. This is a little harder, so we'll
2719 if $file =~ /^\(\w*eval/;
2729 # The breakpoint was inside an eval. This is a little
2732 # Get over to the eval in question.
2842 bad one, we return the error we got from trying to C<eval> it and exit.
2843 If not, we create some code to do the search and C<eval> it so it can't
2864 eval '$inpat =~ m' . "\a$inpat\a";
2867 # Print the eval error and go back for more
2881 # Done in eval so nothing breaks if the pattern
2883 eval '
2935 eval '$inpat =~ m' . "\a$inpat\a";
2951 # Search inside the eval to prevent pattern badness
2953 eval '
3177 unless (eval "sub { s\a$k\a$v\a }; 1") {
3348 # Run *our* eval that executes in the caller's context.
3349 &eval;
3444 &eval;
3502 The subroutine name; C<'(eval)'> if an C<eval>().
3514 The C<eval>() text, if any (undefined for C<eval BLOCK>)
3826 # The '1' forces the eval to be true. It'll be false only
3830 eval { &delete_action(); 1 } or print $OUT $@ and return;
3836 eval { &delete_action($1); 1 } or print $OUT $@ and return;
4213 eval { break_on_line(@_); 1 } or do {
4354 eval { break_subroutine($subname, $cond); 1 } or do {
4384 eval { &delete_breakpoint(); 1 } or print $OUT $@ and return;
4389 eval { &delete_breakpoint($line || $dbline); 1 } or do {
4576 eval { require Class::ISA };
4618 # Set up for DB::eval() - evaluate in *user* context.
4620 my ($s) = &eval;
4679 if (eval($subrange) < -$window) {
5012 # Parameterize DB::eval and call it to get the expression's value
5016 my ($val) = join(' ', &eval);
5111 # Save eval failure, command failure, extended OS error, output field
5452 =item * C<sub> - subroutine name, or C<eval> information
5554 # from the eval text, if any.
5560 # if the require flag is true, the eval text is from a require.
5564 # if it's false, the eval text is really from an eval.
5566 $sub = "eval '$e'";
5569 # If the sub is '(eval)', this is a block eval, meaning we don't
5570 # know what the eval'ed text actually was.
5571 elsif ($sub eq '(eval)') {
5572 $sub = "eval {...}";
5725 eval { require Term::ReadLine } or die $@;
5743 eval "require Term::Rendezvous;" or die;
6279 eval qq{
6620 eval { $term->ornaments(@_) } || '';
6778 B<f> I<(eval 7)> and B<f> I<eval 7\\b> access the body of the 7th eval
6964 B<f> I<(eval 7)> and B<f> I<eval 7\\b> access the body of the 7th eval
7278 eval { require Carp }
7333 die @_ if $^S; # in eval propagate
7337 # hadn't finished. We don't do it anymore, figuring eval is pretty stable.
7338 eval { require Carp };
7355 eval { $mess = Carp::longmess(@_); };
7407 # in an eval().
7487 eval { require Devel::Peek; 1 } or return;
7768 $db_stop = 1 << 30; # ... because this is only used in an eval() later.
7900 =item 3. An C<eval> (the debugger gets a C<(eval N)> fake file for each C<eval>).
7907 # We might possibly want to switch to an eval (which has a "filename"
7908 # like '(eval 9)'), so we may need to clean up the completion text
7916 (C<eval>s are C<_E<lt>(eval NNN)>) keys in C<%main::>. We pull all of these
8435 my ($val) = &eval;