Skip Menu |

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

Report information
The Basics
Id: 127129
Status: new
Priority: 0/
Queue: Regexp-Optimizer

People
Owner: Nobody in particular
Requestors: Andreas.Romeyke [...] slub-dresden.de
Cc:
AdminCc:

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



CC: "art1pirat [...] gmail.com" <art1pirat [...] gmail.com>
Subject: Bugreport, Regexp::Optimizer, Use of uninitialized value $mod in pattern match (m//) at /usr/share/perl5/Regexp/Optimizer.pm line 62
Date: Mon, 17 Sep 2018 14:06:28 +0000
To: "bug-regexp-optimizer [...] rt.cpan.org" <bug-regexp-optimizer [...] rt.cpan.org>
From: "Romeyke, Andreas" <Andreas.Romeyke [...] slub-dresden.de>
Hi Dan, thanks for your Perl-modules, but I found this problem" Use of uninitialized value $mod in pattern match (m//) at /usr/share/perl5/Regexp/Optimizer.pm line 62" using the following Regex in my code: \A(((ansi)|(mac)|(pc)|(pca)(\x5C)((f)|(f1)(\x7B\x5Crt)))\x5Cansicpg).{3,}(\x5Cstshfdbch.{1,4}(\x5Cstshfloch).{1,4}(\x5Cstshfhich).{1,4}(\x5Cstshfbi)) My code looks like: -------------- snip ----------------- use strict; use warnings; use utf8; use v5.24; use Regexp::Optimizer; my $regex1 = '\A(((ansi)|(mac)|(pc)|(pca)(\x5C)((f)|(f1)(\x7B\x5Crt)))\x5Cansicpg).{3,}(\x5Cstshfdbch.{1,4}(\x5Cstshfloch).{1,4}(\x5Cstshfhich).{1,4}(\x5Cstshfbi))'; my $ro = Regexp::Optimizer->new; my $regex2 = $ro->as_string( $regex1 ); # fails say "regex1='$regex1' regex2='$regex2'"; -------------- snap ----------------- I tested it under Debian Gnu/Linux "Stretch" with 5.24: -------------- snip ----------------- $ perl -v This is perl 5, version 24, subversion 1 (v5.24.1) built for x86_64-linux-gnu-thread-multi (with 81 registered patches, see perl -V for more detail) -------------- snap ----------------- The Regexp::Optimizer module is the latest on CPAN (0.23) Hope this helps to fix the problem. Thanks in advance. :) Mit freundlichen Grüßen With best regards, Andreas Romeyke -- team member "long-term preservation" Saxon State- and University Library Dresden (SLUB) Department 2 (IT), Division 2.3 (infrastructure and digital long-term preservation) Zellescher Weg 18 | 01069 Dresden phone: +49 351 4677 763 E-Mail: Andreas.Romeyke@slub-dresden.de http://www.slub-dresden.de/ | @slubdresden