Skip Menu |

This queue is for tickets about the Const-Fast CPAN distribution.

Report information
The Basics
Id: 61726
Status: resolved
Priority: 0/
Queue: Const-Fast

Owner: LEONT [...]
Requestors: ray [...]

Bug Information
Severity: Important
Broken in:
  • 0.004
  • 0.005
Fixed in: (no value)

Subject: Hash loses regexp values
Download (untitled) / with headers
text/plain 193b
Perl version: 5.8.8 The following code does not work as expected: use Const::Fast; const my %rx => ( foo => qr/foo/ ); See attached for some simple tests demonstrating the problem.
text/x-perl 488b
#!/usr/bin/env perl use strict; use warnings FATAL => 'all'; use Const::Fast; use Test::More; use Data::Dumper; { const my $rx => { foo => qr/foo/ }; isa_ok $rx, 'HASH'; isa_ok $rx->{foo}, 'Regexp'; # passes } { my %rx = ( foo => qr/foo/ ); isa_ok \%rx, 'HASH'; isa_ok $rx{foo}, 'Regexp'; # passes } { const my %rx => ( foo => qr/foo/ ); isa_ok \%rx, 'HASH'; isa_ok $rx{foo}, 'Regexp' or diag( Dumper( \%rx ) ); # fails } done_testing();
Download (untitled) / with headers
text/plain 109b
Hi ray, Thanks for the bug report. I've just uploaded version 0.006, which fixes this issue. Regards, Leon

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to