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

People
Owner: LEONT [...] cpan.org
Requestors: ray [...] 1729.org.uk
Cc:
AdminCc:

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 tryme.pl for some simple tests demonstrating the problem.
Subject: tryme.pl
Download tryme.pl
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 Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.