# New Ticket Created by "Chris Davaz"
# Please include the string: [perl #59366]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=59366 >
Fixed a bug in the doc where the method name and doc where mismatched.
Fixed a small bug where, even if the user sets the prompt, a default
prompt '> ' is still printed. Changed it so that a default prompt is
only printed only if the user had not set a prompt (or set an empty
prompt).
Index: compilers/pct/src/PCT/HLLCompiler.pir
===================================================================
--- compilers/pct/src/PCT/HLLCompiler.pir (revision 31432)
+++ compilers/pct/src/PCT/HLLCompiler.pir (working copy)
@@ -135,16 +135,16 @@
=item commandline_banner([string value])
+Set the string in $S0 as a commandline banner on the compiler in $P0. The
+banner is the first text that is shown when the comâ piler is started in
+interactive mode. This can be used for a copyright notice or other information.
+
+=item commandline_prompt([string value])
+
Set the string in $S0 as a commandline prompt on the compiler in $P0. The
prompt is the text that is shown on the commandline before a command is entered
when the compiler is started in interactive mode.
-=item commandline_prompt([string value])
-
-Set the string in $S0 as a commandline banner on the compiler in $P0. The
-banner is the first text that is shown when the comâ piler is started in
-interactive mode. This can be used for a copyright notice or other information.
-
=cut
.sub 'stages' :method
@@ -511,6 +511,7 @@
if encoding == 'fixed_8' goto interactive_loop
unless encoding goto interactive_loop
push stdin, encoding
+
interactive_loop:
.local pmc code
unless stdin goto interactive_end
@@ -518,11 +519,14 @@
## libraries aren't present (RT #41103)
# for each input line, print the prompt
- $P0 = self.'commandline_prompt'()
- printerr $P0
+ $S3 = self.'commandline_prompt'()
+ ne_str $S3, '', prompt_set
+ $S3 = '> '
+ prompt_set:
+ printerr $S3
if has_readline < 0 goto no_readline
- code = stdin.'readline'('> ')
+ code = stdin.'readline'('')
if null code goto interactive_end
concat code, "\n"
goto have_code
Index: config/gen/languages.pm
===================================================================
--- config/gen/languages.pm (revision 31432)
+++ config/gen/languages.pm (working copy)
@@ -54,6 +54,7 @@
unlambda urm
WMLScript
Zcode
+ monkey
};
$data{languages_source} = q{config/gen/makefiles/languages.in};
return \%data;