mrdan has asked for the wisdom of the Perl Monks concerning the following question:
The problem crops up when I run the script from an env PATH in any given directory. Instead of '/r'ing and reprinting require's string argument over the previous prompt, it outputs newlines. If I run the script using ./script.pl when in /usr/local/bin/, it runs fine and I get the expected behavior.
How can I eliminate the difference between running a script from a PATH or running it inside its directory?
Update with some code...
This is actually from the examples included in the module. Typing ABC and pushing enter should simply overwrite the previous prompt with a new blank one. In my case, it's creating newlines.#!/usr/bin/perl use IO::Prompt; prompt "next: ", -integer, -require => { 'next (must be > 0):' => sub { $_ > 0 } }; print "[$_]\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cygwin/perl PATH oddities
by ikegami (Patriarch) on May 14, 2008 at 02:06 UTC | |
|
Re: Cygwin/perl PATH oddities
by syphilis (Archbishop) on May 13, 2008 at 09:43 UTC | |
by mrdan (Novice) on May 13, 2008 at 15:21 UTC | |
by syphilis (Archbishop) on May 14, 2008 at 02:02 UTC |