perlop doc: Regexp Quote-Like Operators error?

R

ruwolf

(Sorry, I have sent this message to comp.lang.perl.moderated but no
response has been returned to me.)

I think I have found an error in perlop documentation.

Because here:
http://perl.jonallen.info/projects/perldoc
is recommended to report bugs here:
http://lists.cpan.org/showlist.cgi?name=perl5-porters
and there (in FAQ) is recommended asking on the comp.lang.perl.misc or
comp.lang.perl.moderated,
I am asking here. :)

In perlop documentation,
- Regexp Quote-Like Operators
-- \G assertion
is this:

====START=OF=QUOTATION====
$_ = <<'EOL';
$url = URI::URL->new( "http://example.com/" ); die if $url eq
"xXx";
EOL
LOOP:
{
print(" digits"), redo LOOP if /\G\d+\b[,.;]?\s*/gc;
print(" lowercase"), redo LOOP if /\G[a-z]+\b[,.;]?\s*/gc;
print(" UPPERCASE"), redo LOOP if /\G[A-Z]+\b[,.;]?\s*/gc;
print(" Capitalized"), redo LOOP if /\G[A-Z][a-z]+\b[,.;]?\s*/gc;
print(" MiXeD"), redo LOOP if /\G[A-Za-z]+\b[,.;]?\s*/gc;
print(" alphanumeric"), redo LOOP if /\G[A-Za-z0-9]+\b[,.;]?\s*/
gc;
print(" line-noise"), redo LOOP if /\G[^A-Za-z0-9]+/gc;
print ". That's all!\n";
}

Here is the output (split into several lines):

line-noise lowercase line-noise lowercase UPPERCASE line-noise
UPPERCASE line-noise lowercase line-noise lowercase line-noise
lowercase lowercase line-noise lowercase lowercase line-noise
MiXeD line-noise. That's all!
=====END=OF=QUOTATION=====

I think it is wrong result
and my copy of this example gives me different result:

=====START=OF=MY=RESULT=====
line-noise lowercase line-noise UPPERCASE line-noise
UPPERCASE line-noise lowercase line-noise lowercase line-noise
lowercase lowercase line-noise lowercase lowercase line-noise
lowercase lowercase line-noise MiXeD line-noise. That's all!
======END=OF=MY=RESULT======

(I have older doc with "http://www/" and it seems to me wrong, too.)

Is it really a bug in doc?
 
S

sln

Here is the output (split into several lines):

line-noise lowercase line-noise lowercase UPPERCASE line-noise
UPPERCASE line-noise lowercase line-noise lowercase line-noise
lowercase lowercase line-noise lowercase lowercase line-noise
MiXeD line-noise. That's all!
=====END=OF=QUOTATION=====

I think it is wrong result
and my copy of this example gives me different result:

=====START=OF=MY=RESULT=====
line-noise lowercase line-noise UPPERCASE line-noise
UPPERCASE line-noise lowercase line-noise lowercase line-noise
lowercase lowercase line-noise lowercase lowercase line-noise
lowercase lowercase line-noise MiXeD line-noise. That's all!
======END=OF=MY=RESULT======

(I have older doc with "http://www/" and it seems to me wrong, too.)

Is it really a bug in doc?

Yes thats a bug. The docs are loaded with bugs!

-sln
 
B

brian d foy

[[ This message was both posted and mailed: see
the "To," "Cc," and "Newsgroups" headers for details. ]]

ruwolf said:
(Sorry, I have sent this message to comp.lang.perl.moderated but no
response has been returned to me.)

I think I have found an error in perlop documentation.

Fixed in 51622cce.

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top