Skip Menu |

This queue is for tickets about the TeX-Hyphen CPAN distribution.

Report information
The Basics
Id: 100923
Status: resolved
Priority: 0/
Queue: TeX-Hyphen

People
Owner: JANPAZ [...] cpan.org
Requestors: mendoza [...] pvv.ntnu.no
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.01
Fixed in: 1.02



Subject: One of the methods in TeX::Hyphen is using $&
One of the methods in TeX::Hyphen is using $& - this ruins performance for everything in the same perl process. Fix diff: sub make_result_list { my ($self, $result) = @_; my @result = (); my $i = 0; - while ($result =~ /./g) { + while ($result =~ /(.)/g) { - push @result, $i if (int($&) % 2); + push @result, $i if (int($1) % 2); $i++; } @result; }
Following the procedure in: http://neilb.org/2013/07/24/adopt-a-module.html I am hereby offering to do a release of TeX::Hyphen with the above fix.
On Mon Dec 15 03:55:09 2014, NICOMEN wrot Show quoted text
> my $i = 0; > - while ($result =~ /./g) { > + while ($result =~ /(.)/g) { > - push @result, $i if (int($&) % 2); > + push @result, $i if (int($1) % 2); > $i++;
Thank you for the patch. I will do a new release shortly.
On Tue, 20 Jan 2015 20:31:45 GMT, JANPAZ wrote: Show quoted text
> On Mon Dec 15 03:55:09 2014, NICOMEN wrot
> > my $i = 0; > > - while ($result =~ /./g) { > > + while ($result =~ /(.)/g) { > > - push @result, $i if (int($&) % 2); > > + push @result, $i if (int($1) % 2); > > $i++;
> > Thank you for the patch. I will do a new release shortly.
The URL http://www.adelton.com/perl/TeX-Hyphen/TeX-Hyphen-1.02.tar.gz has entered CPAN as file: $CPAN/authors/id/J/JA/JANPAZ/TeX-Hyphen-1.02.tar.gz size: 22272 bytes md5: 563d9dc8880dd8f42cac3f96c9645ae3