Fix the man/perldoc/doc command in the debugger.
authorNicholas Clark <nick@ccl4.org>
Fri, 24 May 2013 18:15:10 +0000 (20:15 +0200)
committerNicholas Clark <nick@ccl4.org>
Sat, 25 May 2013 06:51:59 +0000 (08:51 +0200)
This was accidentally broken by commit c7b0c61d36b24841.

lib/perl5db.pl
lib/perl5db.t
pod/perldelta.pod

index 223bfc5..abe08b2 100644 (file)
@@ -3695,7 +3695,7 @@ sub _handle_doc_command {
     # man, perldoc, doc - show manual pages.
     if (my ($man_page)
         = $DB::cmd =~ /\A(?:man|(?:perl)?doc)\b(?:\s+([^(]*))?\z/) {
-        runman($man_page);
+        DB::runman($man_page);
         next CMD;
     }
 
index fe1031b..81bd5da 100644 (file)
@@ -28,7 +28,7 @@ BEGIN {
     }
 }
 
-plan(113);
+plan(114);
 
 my $rc_filename = '.perldb';
 
@@ -2635,6 +2635,26 @@ sub _calc_trace_wrapper
     );
 }
 
+# Test the perldoc command
+# We don't actually run the program, but we need to provide one to the wrapper.
+{
+    my $wrapper = DebugWrap->new(
+        {
+            cmds =>
+            [
+                'perldoc perlrules',
+                'q',
+            ],
+            prog => '../lib/perl5db/t/fact',
+        }
+    );
+
+    $wrapper->output_like(
+        qr/No manual entry for perlrules/,
+        'perldoc command works fine',
+    );
+}
+
 END {
     1 while unlink ($rc_filename, $out_fn);
 }
index d8994b4..14cf88a 100644 (file)
@@ -362,6 +362,12 @@ for C<struct pmop>. Previously it could return memory only aligned to a
 on some 32 bit platforms. Notably, this caused the build to fail completely
 on sparc GNU/Linux. [RT #118055]
 
+=item *
+
+The debugger's C<man> command been fixed. It was broken in the v5.18.0
+release. The C<man> command is aliased to the names C<doc> and C<perldoc> -
+all now work again.
+
 =back
 
 =head1 Known Problems