This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Promote eval( "require ..." ) to eval { require ... }
authorJosh ben Jore <jjore@cpan.org>
Sat, 10 Jul 2010 14:53:35 +0000 (07:53 -0700)
committerJosh ben Jore <jjore@cpan.org>
Sat, 10 Jul 2010 19:25:11 +0000 (19:25 +0000)
lib/perl5db.pl

index 09613a3..da872e6 100644 (file)
@@ -6018,7 +6018,7 @@ sub setterm {
 
         # We don't have a TTY - try to find one via Term::Rendezvous.
         else {
-            eval "require Term::Rendezvous;" or die;
+            require Term::Rendezvous;
 
             # See if we have anything to pass to Term::Rendezvous.
             # Use $HOME/.perldbtty$$ if not.
@@ -8617,7 +8617,7 @@ if PadWalker could be loaded.
 
 =cut
 
-        if (not $text =~ /::/ and eval "require PadWalker; 1" and not $@ ) {
+        if (not $text =~ /::/ and eval { require PadWalker } and not $@ ) {
             my $level = 1;
             while (1) {
                 my @info = caller($level);