Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Ref-Util CPAN distribution.

Report information
The Basics
Id: 110434
Status: resolved
Priority: 0/
Queue: Ref-Util

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

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



Subject: Perl 5.8, 5.10 support
To get it to work on 5.8/5.10 I was trying to adjust the is_regexpref function, and cribbing off of Data::Dumper: https://metacpan.org/source/SMUELLER/Data-Dumper-2.154/Dumper.xs#L481 https://metacpan.org/source/SMUELLER/Data-Dumper-2.154/Dumper.xs#L564 And I was able to get it to compile and pass all the non-regexp tests, tut either my logic was flawed or I was misreading the code. SvOBJECT(SvRV(ref)) was not returning true for me. Looks like Perl 5.6 support should also be possible, though that will matter to others more than me :)
On 2015-12-18 07:30:40, PLICEASE wrote: Show quoted text
> To get it to work on 5.8/5.10 I was trying to adjust the is_regexpref > function, and cribbing off of Data::Dumper: > > https://metacpan.org/source/SMUELLER/Data-Dumper-2.154/Dumper.xs#L481 > https://metacpan.org/source/SMUELLER/Data-Dumper-2.154/Dumper.xs#L564 > > And I was able to get it to compile and pass all the non-regexp tests, > tut either my logic was flawed or I was misreading the code. > SvOBJECT(SvRV(ref)) was not returning true for me. > > Looks like Perl 5.6 support should also be possible, though that will > matter to others more than me :)
In pure perl, I think such a beast would merely be: re->can('is_regexp') ? re::is_regexp($_[0]) : ref($_[0]) eq 'Regexp'
Sawyer asked me to move this convo to the GitHub repo: https://github.com/p5pclub/ref-util/issues/2
Ticket migrated to github as https://github.com/p5pclub/ref-util/issues/4