bug? 5.004 v. 5.005 
Author Message
 bug? 5.004 v. 5.005

Okay, first a question.  Where can I (or can I) find a list of reported
bugs for a given version of perl?  The list on CPAN says it is no longer
maintained, so I tried a search on dejanews to see if I am reporting a
bug that's already been found.  Oh well, just a question.

Now, in 5.004, the code does what I expect, even though it's poorly
written.  It outputs "1 - 2 - 3 - 4 - " for each letter in the '$_'
string.

In 5.005, it goes into an infinite loop, continuously printing
"1 - 2 - 3 - 4 - " against the letter "a".

Here's the code:
============================
#!/usr/bin/perl -w
use strict;
$_='a b c d';

while(m/(\w)\s*/g)
{
   print "$1:";  

   {
      print "$_ - ";
   }
   print "\n";

Quote:
}

============================

So, basically, in 5.004, the "m//g" in the while loop is working on the
"global" $_ variable, and the print is printing a "local" $_ variable.


is perhaps using the same $_ as the "m//g" in the while, so the "/g"
get's confused at it's position, and starts over.

Now, this is all part of a much bigger program, and I just boiled it
down to a small example.  Also, it is rather easily fixed to work in
both 5.004 and 5.005, so, the question:  is everyone aware of this, and
is it fixed (or going to be), or was it a bug in 5.004 that is now
fixed?

Curious,
Karlon



Tue, 31 Jul 2001 03:00:00 GMT  
 bug? 5.004 v. 5.005
Hi Karlon:

Quote:
>Okay, first a question.  Where can I (or can I) find a list of reported
>bugs for a given version of perl?

perldelta.pod ill give the list of fixes and
changes. While not exactly what you asked,
once 5.005 was released it is pretty close.

Quote:
>Now, this is all part of a much bigger program, and I just boiled it
>down to a small example.  Also, it is rather easily fixed to work in
>both 5.004 and 5.005, so, the question:  is everyone aware of this, and
>is it fixed (or going to be), or was it a bug in 5.004 that is now
>fixed?

There were changes made in foreach to reduce memory usage in
some cases. I did not research whether your case fit the details.

-bill

Making computers work in Manufacturing for over 25 years (inquiries welcome)



Wed, 01 Aug 2001 03:00:00 GMT  
 bug? 5.004 v. 5.005
I have been advised by


from p5p that this bug is fixed by the patch contained in

http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/1999-02/msg006...

Be forewarned that this is a patch to 5.005_5x, the development track.
If you are trying to patch a released track (5.005_02 or 5.005_03 maint
release trial), you will need to search the code and apply the patches
by hand since the line numbers do not match up in that code.

Quote:

> Hi Karlon:

> >Okay, first a question.  Where can I (or can I) find a list of reported
> >bugs for a given version of perl?

> perldelta.pod ill give the list of fixes and
> changes. While not exactly what you asked,
> once 5.005 was released it is pretty close.

> >Now, this is all part of a much bigger program, and I just boiled it
> >down to a small example.  Also, it is rather easily fixed to work in
> >both 5.004 and 5.005, so, the question:  is everyone aware of this, and
> >is it fixed (or going to be), or was it a bug in 5.004 that is now
> >fixed?

> There were changes made in foreach to reduce memory usage in
> some cases. I did not research whether your case fit the details.

> -bill

> Making computers work in Manufacturing for over 25 years (inquiries welcome)

--
Matthew O. Persico
http://www.erols.com/mpersico
http://www.digistar.com/bzip2


Sun, 05 Aug 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Bug with localtime() in Perl 5.004 and 5.005

2. BUG? Cannot Read 5.004 .db file with 5.005

3. bug? 5.004 v. 5.005

4. new hash trap for naive people arose 5.004 to 5.005

5. active perl 5.005 or standard perl 5.004

6. Module that compiled under 5.004 fails under 5.005 in a RedHat environm

7. (\w)? behaviour 5.005 vs 5.004

8. Upgrading from 5.004 to 5.005

9. Sort runtime 5.005 vs 5.004

10. workworks in 5.003 and 5.004 but not 5.005

11. Works on 5.005 but not 5.004?

12. undef a typeglob in perl 5.004 and 5.005

 

 
Powered by phpBB® Forum Software