File Coverage

blib/lib/Acme/NamespaceRoulette.pm
Criterion Covered Total %
statement 18 23 78.2
branch n/a
condition n/a
subroutine 6 7 85.7
pod n/a
total 24 30 80.0


line stmt bran cond sub pod time code
1             package Acme::NamespaceRoulette;
2              
3 1     1   15278 use 5.008000;
  1         3  
  1         31  
4 1     1   3 use strict;
  1         2  
  1         31  
5 1     1   4 no strict 'refs';
  1         7  
  1         19  
6 1     1   4 use warnings;
  1         1  
  1         49  
7              
8             require Exporter;
9             our @ISA = qw(Exporter);
10             our @EXPORT = qw(AUTOLOAD);
11              
12 1     1   426 use Symbol;
  1         703  
  1         59  
13 1     1   424 use POSIX;
  1         5910  
  1         7  
14              
15             our $VERSION = '4.56';
16              
17             sub AUTOLOAD {
18 0     0     my @names = grep { /^(?:\w+|\w+::\w+)$/ } keys %::;
  0            
19 0           my $rand = qualify( $names[ rand @names ] );
20 0           $rand =~ s/Acme::NamespaceRoulette/main/;
21 0           goto &$rand;
22             }
23              
24             1;
25             __END__