Skip Menu |

This queue is for tickets about the FLAT CPAN distribution.

Report information
The Basics
Id: 115605
Status: resolved
Priority: 0/
Queue: FLAT

People
Owner: Nobody in particular
Requestors: user42_kevin [...] yahoo.com.au
Cc:
AdminCc:

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



Subject: FLAT::Regex union()
Date: Sun, 26 Jun 2016 18:39:36 +1000
To: bug-FLAT [...] rt.cpan.org
From: Kevin Ryde <user42_kevin [...] yahoo.com.au>
In FLAT 0.9.1 on a debian i386 perl 5.22.1, a program use strict; use FLAT::Regex; my $f1 = FLAT::Regex->new('a*'); my $f2 = FLAT::Regex->new('b*'); $f1->union($f2); gets an error Can't locate object method "new" via package "FLAT::Regex::op::alt" (perhaps you forgot to load "FLAT::Regex::op::alt"?) at /usr/share/perl5/FLAT/Regex.pm line 67. The offending line is in the union() method. Is it as simple as meant to be uppercase Op?
Thank you for the report. I wrote this module over 10 years ago for a thesis project (perl 5.6-ish, I think); but I've been meaning to modernize it. I think it has more to do with bit rot than anything else. Thank you for the report, I will take a look at it. estrabd On Sun Jun 26 04:39:17 2016, user42_kevin@yahoo.com.au wrote: Show quoted text
> In FLAT 0.9.1 on a debian i386 perl 5.22.1, a program > > use strict; > use FLAT::Regex; > my $f1 = FLAT::Regex->new('a*'); > my $f2 = FLAT::Regex->new('b*'); > $f1->union($f2); > > gets an error > > Can't locate object method "new" via package "FLAT::Regex::op::alt" > (perhaps you forgot to load "FLAT::Regex::op::alt"?) > at /usr/share/perl5/FLAT/Regex.pm line 67. > > The offending line is in the union() method. > Is it as simple as meant to be uppercase Op?
Subject: Re: [rt.cpan.org #115605] FLAT::Regex union()
Date: Wed, 29 Jun 2016 17:02:22 +1000
To: "B. D. Estrade via RT" <bug-FLAT [...] rt.cpan.org>
From: Kevin Ryde <user42_kevin [...] yahoo.com.au>
"B. D. Estrade via RT" <bug-FLAT@rt.cpan.org> writes: Show quoted text
> > I've been meaning to modernize it.
The vintage seems fine :). Show quoted text
> I think it has more to do with bit rot than anything else.
The only perhaps age-related thing I noticed was the acyclic strings iterator gives different results on each run. As a wild guess perhaps hash randomization of recent perl. Not necessarily a bug if no particular string order etc was ever intended there ...
On Wed Jun 29 03:02:42 2016, user42_kevin@yahoo.com.au wrote: Show quoted text
> "B. D. Estrade via RT" <bug-FLAT@rt.cpan.org> writes:
> > > > I've been meaning to modernize it.
> > The vintage seems fine :). >
> > I think it has more to do with bit rot than anything else.
> > The only perhaps age-related thing I noticed was the acyclic strings > iterator gives different results on each run. As a wild guess perhaps > hash randomization of recent perl. Not necessarily a bug if no > particular string order etc was ever intended there ...
Correct, no order is implied. Glad you're digging the module, it was a labor of love. Now I might get back into it. Thanks! Brett
Subject: Re: [rt.cpan.org #115605] FLAT::Regex union()
Date: Sat, 02 Jul 2016 13:28:20 +1000
To: "B. D. Estrade via RT" <bug-FLAT [...] rt.cpan.org>
From: Kevin Ryde <user42_kevin [...] yahoo.com.au>
"B. D. Estrade via RT" <bug-FLAT@rt.cpan.org> writes: Show quoted text
>
>> acyclic strings iterator
> > Correct, no order is implied.
The test suite seems to fail sometimes (randomly) somewhere near the iterator. The closest I could tell was maybe init_acyclic_iterator doesn't enjoy a DFA with no start state (misses an arg to get_acyclic_sub). But I could be completely wrong there, and I don't know why a dfa would come from the tests with no start state anyway. Show quoted text
> Glad you're digging the module, it was a labor of love. Now I might > get back into it.
I broke it out for some bit strings related to dragon curve, believe it or not. I had some of my own stuff but raised to yours for better union, intersect, concat :-). One thing I had the urge for there was to match all prefixes of strings matched by a given FA. I did that by setting all predecessors of an accepting state as themselves accepting. Such a thing isn't hiding under a name I don't know is it?
On Fri Jul 01 23:29:21 2016, user42_kevin@yahoo.com.au wrote: Show quoted text
> "B. D. Estrade via RT" <bug-FLAT@rt.cpan.org> writes:
> >
> >> acyclic strings iterator
> > > > Correct, no order is implied.
> > The test suite seems to fail sometimes (randomly) somewhere near the > iterator. The closest I could tell was maybe init_acyclic_iterator > doesn't enjoy a DFA with no start state (misses an arg to > get_acyclic_sub). But I could be completely wrong there, and I don't > know why a dfa would come from the tests with no start state anyway. >
> > Glad you're digging the module, it was a labor of love. Now I might > > get back into it.
> > I broke it out for some bit strings related to dragon curve, believe it > or not. I had some of my own stuff but raised to yours for better > union, intersect, concat :-). > > One thing I had the urge for there was to match all prefixes of strings > matched by a given FA. I did that by setting all predecessors of an > accepting state as themselves accepting. Such a thing isn't hiding > under a name I don't know is it?
I fixed the tests. After which, I tried your original error case. I couldn't reproduce the error any more. I added a regression test, though. Thanks!