File Coverage

blib/lib/Acme/BeCool.pm
Criterion Covered Total %
statement 14 14 100.0
branch 2 4 50.0
condition n/a
subroutine 2 2 100.0
pod n/a
total 18 20 90.0


line stmt bran cond sub pod time code
1             package Acme::BeCool;
2              
3             =head1 NAME
4              
5             Acme::BeCool -- Make your modules use the modules that get you some.
6              
7             =head1 SYNOPSIS
8              
9             use Acme::BeCool; # Wakka-chikka, wakka-chikka...
10              
11             # Whatever you write here will get play.
12              
13             or
14              
15             use Acme::BeCool qw(This That And The::Other); # I *define* cool.
16             # really?
17              
18             =cut
19              
20             # This improves my Kwalitee?
21             q#
22             use strict;
23             use warnings;
24             #;
25              
26             $VERSION = '0.02';
27              
28 1     1   215201 use LWP::Simple;
  1         2104745  
  1         9  
29              
30             sub import
31             {
32 1     1   7 shift;
33 1 50       8 if (!@_) {
34 1         5 my $page = get 'http://search.cpan.org/search?query=cool&mode=all';
35 1         1764883 push @_, $1 while $page =~ m!(.*?)!g;
36             }
37 1         15 @_ = grep !/\//, @_;
38 1         3 my $caller = shift;
39 1         3 my $cool = 0;
40 1         4 for (@_) {
41 9         773 eval "require $_";
42 9 50       58 $caller->import($_) unless $@;
43             }
44 1         9101 print STDERR "You are ", ($cool / @_), "\% cool\n";
45             }
46              
47             1;
48             __END__