Skip Menu |

This queue is for tickets about the Regexp-Common CPAN distribution.

Report information
The Basics
Id: 2864
Status: resolved
Priority: 0/
Queue: Regexp-Common

People
Owner: Nobody in particular
Requestors: cogent [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.113
Fixed in: (no value)



Subject: Documentation wrong for parameter "name" of function "pattern"
I'm using Regexp::Common 2.113 on Mac OS X 10.2.6, with perl 5.8.0. The documentation for the "pattern" function is incorrect. It says that flag defaults may be specified with the form "-flag=default", and that the default is applied "whenever the flag is omitted, or specified without an explicit value". In the code, it is only applied when the flag is specified without an explicit value. Since this seems to be the better behavior, I have changed the documentation to match the code, rather than the other way around.
*** Regexp-Common-2.113/lib/Regexp/Common.pm Wed Apr 2 16:23:48 2003 --- Regexp-Common-patched/lib/Regexp/Common.pm Sun Jun 29 16:06:53 2003 *************** *** 554,566 **** This specifies an entry C<$RE{line}{of}>, which may take a C<-char> flag. Flags may also be specified with a default value, which is then used whenever ! the flag is omitted, or specified without an explicit value. For example: pattern name => [qw( line of -char=_ )], # default char is '_' # other args here ; - =item C<create =E<gt> $sub_ref_or_string> --- 554,566 ---- This specifies an entry C<$RE{line}{of}>, which may take a C<-char> flag. Flags may also be specified with a default value, which is then used whenever ! the flag is specified without an explicit value (but not when the flag is ! omitted). For example: pattern name => [qw( line of -char=_ )], # default char is '_' # other args here ; =item C<create =E<gt> $sub_ref_or_string>
Thanks, applied. Will be in the next release.