Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^2: Parsing and translating Perl Regexes ( PPIx::Regexp::xplain Regexp::Debugger )

by Anonymous Monk
on Nov 05, 2013 at 17:45 UTC ( #1061341=note: print w/replies, xml ) Need Help??

in reply to Re: Parsing and translating Perl Regexes ( PPIx::Regexp::xplain Regexp::Debugger )
in thread Parsing and translating Perl Regexes

Would you be willing to provide the particulars on the problems you have with PPIx::Regexp's modifier propagation so I can improve it? Either an RT ticket or electronic mail to wyant at cpan dot org will do the trick.


Tom Wyant

  • Comment on Re^2: Parsing and translating Perl Regexes ( PPIx::Regexp::xplain Regexp::Debugger )

Replies are listed 'Best First'.
Re^3: Parsing and translating Perl Regexes ( PPIx::Regexp::xplain Regexp::Debugger )
by Anonymous Monk on Nov 05, 2013 at 19:18 UTC

    :) But if I do that I'll have to update my program, and I'm lazy and its hard to juggle :)

    Ok, if you're willing to accept this is a roundabout way to report an issue, a work in progress that stalled few months ago, that started organically as a single subroutine walking the PPIx::Regexp tree and grew from there, slowly as I am learning my way around, into its current state, still in need of refactoring ...

    I'll post the full code in two followups but here is an excerpt from from what I thought were bugs that received a "TODO.*BUG" note. If there are any inaccuracies thinkos typos you have been warned :)

    In in furtherance of blind copying, the corresponding entries from my "test suite" (it tests my eyeball interface)

    And one more

    In the code below the modifiers propagation code is in the following definitions (you can copy/paste each line to find the sub definition)

        OK, thanks. The object hierarchy may be what it is now, for good or ill. But to the extent I understand your code it is not only a documentation of PPIx::Regexp bugs, but a neat piece of work in its own right.

        I can't guarantee timing, since all sorts of things have come up in the last couple days, but:

        Which of the bugs can I fix without breaking your code? Lacking any preference from you I'll probably start with the \g10 thing, which I hope to be reasonably straightforward.

        Do I need to reserve some method names for your use? Like xplain()? I'm not sure how to document it, but I'm willing at least to avoid a few that you designate.

        Can you be a little clearer on the modifier propagation thing? Or at least point me to the relevant part of your postings? I remember worrying about this during the Perl::Critic integration, but it may be that I was so focused on dealing with 'use re "/xms";' that I missed something in the regex itself.

        Tom Wyant

        bah, can't fork/update the anonymous gist anymore, so here is a patch to explain /(?^:foo$)/m is the same as /(?-xism:foo$)/m

        --- 2014-02-04 23:58:11.265625000 -0800 +++ 2014-12-30 20:54:31.250000000 -0800 @@ -1159,6 +1159,10 @@ #~ delete @mods{@offers} ; ## OFFERS TRUMP ONNERS $mods{$_}=0 for @offers ; ## OFFERS TRUMP ONNERS + if( $con eq '^' ){ + $mods{$_}=0 for qw/ i m s x /; ## d-imsx http://perldoc.^alupimsx%29 + } + @mods = ( @onners, @offers ); if( $notroot ){

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1061341]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2022-05-28 21:20 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (101 votes). Check out past polls.