File Coverage

blib/lib/KeyedMutex/Lock.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition 1 3 33.3
subroutine 4 4 100.0
pod n/a
total 17 19 89.4


line stmt bran cond sub pod time code
1 4     4   20 use strict;
  4         7  
  4         150  
2 4     4   19 use warnings;
  4         4  
  4         505  
3              
4             package KeyedMutex::Lock;
5              
6             sub _new {
7 1     1   3 my ($klass, $km) = @_;
8 1   33     10 $klass = ref($klass) || $klass;
9 1         7 bless \$km, $klass;
10             }
11              
12             sub DESTROY {
13 1     1   212 my $self = shift;
14 1         4 ${$self}->release;
  1         5  
15             }
16              
17             1;
18              
19             __END__
20              
21             =head1 NAME
22              
23             KeyedMutex::Lock - A lock object for KeyedMutex
24              
25             =head1 DESCRIPTION
26              
27             There are no public methods exposed from the module. See documentation of C<KeyedMutex> for detail.
28              
29             =head1 AUTHOR
30              
31             Copyright (c) 2007 Cybozu Labs, Inc. All rights reserved.
32              
33             written by Kazuho Oku E<lt>kazuhooku@gmail.comE<gt>
34              
35             =head1 LICENSE
36              
37             This program is free software; you can redistribute it and/or modify it under th
38             e same terms as Perl itself.
39              
40             See http://www.perl.com/perl/misc/Artistic.html
41              
42             =cut
43              
44