Skip Menu |

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

Report information
The Basics
Id: 104828
Status: open
Priority: 0/
Queue: Regexp-Debugger

People
Owner: Nobody in particular
Requestors: NKH [...] cpan.org
Cc:
AdminCc:

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



Subject: Accept input on the command line
when input to be matched contains escape characters, the possibility to pipe the output in rxrx would help the user. being able to define the regex and other options on the command line would also be useful
rxrx accepts names of files containing the regular expression (possibly compiled) and the text to match. files containing a regular expression and the text to match can also be given within rxrx reasons: when developing an application, the regular expression can be complex or build from elements during the course of the program run, the developer can easily save it in a file. input to match can also be build dynamically
a command allow the reloading of the files containing the regular expression, and the data to be matched,
Subject: Re: [rt.cpan.org #104828] Accept input on the command line
Date: Sat, 6 Jun 2015 07:38:06 +1000
To: bug-Regexp-Debugger [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Hi Nadim, I appreciate these various suggestiosn for improvements to rxrx. However, it does occur to me that many of them would be better answered by simply writinga small Perl script of the form: use Regexp::Debugger; my $REGEX = qr{ my (??{'complex'}) re?ge?x (?&here) (?(DEFINE) (?<here> be dragons) ) }x; for my $str (<DATA>) { $str =~ $REGEX; } __DATA__ strings to test all placed here mycomplexrgxbedragons et cetera Then you could just edit the regex and/or the test strings within the file, and rerun it as many times as you needed to. All the best, Damian
Subject: Re: [rt.cpan.org #104828] Accept input on the command line
Date: Sat, 6 Jun 2015 11:48:06 +0200
To: bug-Regexp-Debugger [...] rt.cpan.org
From: nadim khemir <nadim.khemir [...] gmail.com>
Hi Damian, thank you for the example but I still think the few user interface requirements I wrote are valid (because I found them while using rxrx). The limitations I see are not a core limitation but the interface. rxrx is very nice to use for educational purposes but becomes more difficult when used for development. While running rxrx, the need for interaction is greater than stepping in the regexp; manipulating the regexp, the input, being able to bring back a previous regexp, keeping information about the regexp run, all of it needs needs some practical interface that I don't believe a simple wrapper script can provide. Sometimes the interaction with Regex::Debugger is for a new regexp and sometimes for an old regexp deep inside so code, different contexts. In the later it is not a clear cut how one wants to handle it. Just firing Regexp::Debugg may be a solution but that means interaction. At other time is the collection of all the strings run through a regex that one needs to analyze, in that case the interactivity becomes a problem. I'd make the interface, time to learn some readline and curses anyway, but it felt, from our previous conversations, that you were on the way to do that. I understand that the times are busy, I have a little idea of what could take your time, so I will gladly write another interface but when I do that I like to do it in synch with the original developer, And that, of course, only if the originator doesn't want/have time to do it. Cheers, Nadim. On Fri, Jun 5, 2015 at 11:38 PM, damian@conway.org via RT < bug-Regexp-Debugger@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=104828 > > > Hi Nadim, > > I appreciate these various suggestiosn for improvements to rxrx. > > However, it does occur to me that many of them would be better answered > by simply writinga small Perl script of the form: > > use Regexp::Debugger; > > my $REGEX = qr{ > my (??{'complex'}) re?ge?x (?&here) > > (?(DEFINE) > (?<here> be dragons) > ) > }x; > > for my $str (<DATA>) { > $str =~ $REGEX; > } > > __DATA__ > strings to test > all placed here > mycomplexrgxbedragons > et cetera > > Then you could just edit the regex and/or the test strings within the > file, > and rerun it as many times as you needed to. > > All the best, > > Damian > >
Subject: Re: [rt.cpan.org #104828] Accept input on the command line
Date: Sun, 7 Jun 2015 07:29:27 +1000
To: bug-Regexp-Debugger [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Hi Nadim, I'm afraid I am very preoccupied at the moment, and have many other projects I also have to tend. I don't really have time for anything but critical bug maintenance on most of my CPAN modules, including Regexp::Debugger. So, if you have the time and the inclination to improve the module, or the rxrx interface, I'd be delighted for you to do so. You're most welcome to either send me patches against the current module, or else write a separate module (in the Regexp::Debugger::* namespace) as a wrapper. All the best, Damian