File Coverage

blib/lib/Event/var.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition 1 2 50.0
subroutine 4 4 100.0
pod 0 1 0.0
total 19 21 90.4


line stmt bran cond sub pod time code
1 24     24   80 use strict;
  24         24  
  24         683  
2             package Event::var;
3 24     24   91 use base 'Event::Watcher';
  24         20  
  24         1322  
4 24     24   85 use vars qw(@ATTRIBUTE);
  24         20  
  24         2363  
5             @ATTRIBUTE = qw(var poll);
6              
7             'Event::Watcher'->register;
8              
9             sub new {
10             # lock %Event::;
11              
12 10     10 0 10 my $class = shift;
13 10         20 my %arg = @_;
14 10   50     206 my $o = allocate($class, delete $arg{attach_to} || {});
15 10         32 $o->init(\%arg);
16 7         21 $o;
17             }
18              
19             1;