develooper Front page | perl.perl5.porters | Postings from December 2013

[perl #115430] Data::Dumper of regexps not idempotent

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
December 14, 2013 00:45
Subject:
[perl #115430] Data::Dumper of regexps not idempotent
Message ID:
rt-4.0.18-23417-1386981946-1568.115430-15-0@perl.org
On Mon Nov 12 19:59:39 2012, khw wrote:
> On Wed Oct 24 12:37:42 2012, smueller@cpan.org wrote:
> > On 10/24/2012 09:33 AM, demerphq wrote:
> > > On 23 October 2012 15:45, Brad Gilbert <b2gills@gmail.com> wrote:
> > >> The problem is internal to perl, so any module that prints it out will
> > >> exhibit the same behaviour.
> > >
> > > Actually no it is not a core bug, it is a deficiency in the logic used
> > > by DD and other modules.  Data::Dump::Streamer has been doing this
> > > right for years, and the code to support doing it right was migrated
> > > from DDS to core long ago. See re::regexp_pattern() in list context.
> > 
> > It is a bug in DD, not the core. But rt.perl.org is still the 
> > appropriate place to file bugs. Data::Dumper is maintained as part of 
> > the core.
> > 
> > --Steffen
> > 
> 
> I looked at Data::Dumper.pm source, and see this outdated comment:
>         # This really sucks, re:regexp_pattern is in ext/re/re.xs and
> not in 
>         # universal.c, and even worse we cant just require that re to be
> loaded
>         # we *have* to use() it. 
>         # We should probably move it to universal.c for 5.10.1 and fix this.
>         # Currently we only use re::regexp_pattern when the re is
> blessed into another
>         # package. This has the disadvantage of meaning that a DD dump
> won't round trip
>         # as the pattern will be repeatedly wrapped with the same modifiers.
>         # This is an aesthetic issue so we will leave it for now, but we
> could use
>         # regexp_pattern() in list context to get the modifiers separately.
>         # But since this means loading the full debugging engine in
> process we wont
>         # bother unless its necessary for accuracy.
> 
> The reason it is outdated is that re::regexp_pattern has been put in
> universal.c
> 

Steffen, Karl, Yves:  Can we get an update on the status of this ticket?

Thank you very much.
Jim Keenan



---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=115430

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About