Re: [Module::Build] stem config code
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <Ra...@Th...> - 2004-01-04 15:29:52
|
On 1/4/2004 2:01 AM, Uri Guttman wrote:
> sub edit_query {
> my ( $query, $default ) = @_;
> chomp $query;
> my $last_line = (split /\n/, $query)[-1];
> if ( length( $last_line ) + 2 * length( $default ) > 70 ) {
> $query .= "\n\t";
> }
> return $query ;
> }
A simple format_prompt() function similar to the above which also
wrapped lines on word boundaries at some configurable screen width could
make for some nicer prompts.
Randy.
|