summaryrefslogtreecommitdiff
path: root/lib/Term
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-10-04 09:06:20 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-10-04 09:06:20 +0000
commitce5e090c3cdc0df8112cc707442a0492b20b168b (patch)
tree0db2a6568a96cd16754d98cda8b9f223a17b8a7f /lib/Term
parent92807b6db324019bc3908bb03cb16c8eaf92c5bd (diff)
downloadperl-ce5e090c3cdc0df8112cc707442a0492b20b168b.tar.gz
Update Term::UI to 0.16
p4raw-id: //depot/perl@32021
Diffstat (limited to 'lib/Term')
-rw-r--r--lib/Term/UI.pm24
-rw-r--r--lib/Term/UI/History.pm2
-rw-r--r--lib/Term/UI/t/02_ui.t8
3 files changed, 17 insertions, 17 deletions
diff --git a/lib/Term/UI.pm b/lib/Term/UI.pm
index 5c40b78ca7..c7cd4cd5b1 100644
--- a/lib/Term/UI.pm
+++ b/lib/Term/UI.pm
@@ -11,7 +11,7 @@ use strict;
BEGIN {
use vars qw[$VERSION $AUTOREPLY $VERBOSE $INVALID];
$VERBOSE = 1;
- $VERSION = '0.14_01';
+ $VERSION = '0.16';
$INVALID = loc('Invalid selection, please try again: ');
}
@@ -404,9 +404,9 @@ sub parse_options {
my $return = {};
### there's probably a more elegant way to do this... ###
- while ( $input =~ s/--?([-\w]+=("|').+?\2)(?:\Z|\s+)// or
- $input =~ s/--?([-\w]+=\S+)(?:\Z|\s+)// or
- $input =~ s/--?([-\w]+)(?:\Z|\s+)//
+ while ( $input =~ s/(?:\s+)--?([-\w]+=("|').+?\2)(?=\Z|\s+)// or
+ $input =~ s/(?:\s+)--?([-\w]+=\S+)(?=\Z|\s+)// or
+ $input =~ s/(?:\s+)--?([-\w]+)(?=\Z|\s+)//
) {
my $match = $1;
@@ -604,17 +604,17 @@ will warn about this and return C<undef>.
C<Params::Check>, C<Term::ReadLine>, C<Term::UI::History>
+=head1 BUG REPORTS
+
+Please report bugs or other issues to E<lt>bug-term-ui@rt.cpan.org<gt>.
+
=head1 AUTHOR
-This module by
-Jos Boumans E<lt>kane@cpan.orgE<gt>.
+This module by Jos Boumans E<lt>kane@cpan.orgE<gt>.
=head1 COPYRIGHT
-This module is
-copyright (c) 2002 - 2005 Jos Boumans E<lt>kane@cpan.orgE<gt>.
-All rights reserved.
+This library is free software; you may redistribute and/or modify it
+under the same terms as Perl itself.
-This library is free software;
-you may redistribute and/or modify it under the same
-terms as Perl itself.
+=cut
diff --git a/lib/Term/UI/History.pm b/lib/Term/UI/History.pm
index 9ac09aa848..1d77c01c6f 100644
--- a/lib/Term/UI/History.pm
+++ b/lib/Term/UI/History.pm
@@ -8,7 +8,7 @@ use base 'Log::Message::Simple';
=head1 NAME
-Log::Message::Simple
+Term::UI::History
=head1 SYNOPSIS
diff --git a/lib/Term/UI/t/02_ui.t b/lib/Term/UI/t/02_ui.t
index dbefdce55a..874ffc8d5b 100644
--- a/lib/Term/UI/t/02_ui.t
+++ b/lib/Term/UI/t/02_ui.t
@@ -106,9 +106,9 @@ my $tmpl = {
#### test parse_options
{
my $str = q[command --no-foo --baz --bar=0 --quux=bleh ] .
- q[--option="some'thing" -one-dash -single=blah' foo];
+ q[--option="some'thing" -one-dash -single=blah' foo bar-zot];
- my $munged = 'command foo';
+ my $munged = 'command foo bar-zot';
my $expected = {
foo => 0,
baz => 1,
@@ -121,6 +121,6 @@ my $tmpl = {
my ($href,$rest) = $term->parse_options( $str );
- is_deeply( $href, $expected, q[Parsing options] );
- is($rest,$munged, q[Remaining unparsed string] );
+ is_deeply($href, $expected, qq[Parsing options] );
+ is($rest, $munged, qq[Remaining unparsed string '$munged'] );
}