blib/lib/Devel/TypeTiny/Perl58Compat.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod n/a totaltotal 0.0% 0 / 26 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 # INTERNAL MODULE: Perl 5.8 compatibility for Type::Tiny.
2  
3 package Devel::TypeTiny::Perl58Compat;
4  
5 use 5.008;
6 use strict;
7 use warnings;
8  
9 our $AUTHORITY = 'cpan:TOBYINK';
10 our $VERSION = '2.010001';
11  
12 $VERSION =~ tr/_//d;
13  
14 #### re doesn't provide is_regexp in Perl < 5.10
15  
16 eval 'require re';
17  
18 unless ( exists &re::is_regexp ) {
19 require B;
20 *re::is_regexp = sub {
21 eval { B::svref_2object( $_[0] )->MAGIC->TYPE eq 'r' };
22 };
23 }
24  
25 #### Done!
26  
27 5.8;