From: Slaven Rezic Date: Sat, 9 Nov 2002 22:31:31 +0000 (+0100) Subject: warning fix in SYNOPSIS example of Term::ReadLine pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d49f26d47a884d90aae378b8a343605c5f035cd8;p=p5sagit%2Fp5-mst-13.2.git warning fix in SYNOPSIS example of Term::ReadLine pod Message-Id: <200211092131.gA9LVVAV007663@vran.herceg.de> p4raw-id: //depot/perl@18137 --- diff --git a/lib/Term/ReadLine.pm b/lib/Term/ReadLine.pm index 477aa43..238e9fd 100644 --- a/lib/Term/ReadLine.pm +++ b/lib/Term/ReadLine.pm @@ -10,7 +10,7 @@ If no real package is found, substitutes stubs instead of basic functions. my $prompt = "Enter your arithmetic expression: "; my $OUT = $term->OUT || \*STDOUT; while ( defined ($_ = $term->readline($prompt)) ) { - my $res = eval($_), "\n"; + my $res = eval($_); warn $@ if $@; print $OUT $res, "\n" unless $@; $term->addhistory($_) if /\S/; @@ -33,7 +33,7 @@ or as $term->addhistory('row'); -where $term is a return value of Term::ReadLine-EInit. +where $term is a return value of Term::ReadLine-Enew(). =over 12 @@ -60,7 +60,7 @@ support. Trailing newline is removed. Returns C on C. adds the line to the history of input, from where it can be used if the actual C is present. -=item C, $C +=item C, C return the filehandles for input and output or C if C input and output cannot be used for Perl.