blib/lib/File/Properties/PropsCache.pm untested

filter: Statementstmt 0.0% 0 / 34 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 10 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 46 CC 1 SCAR 6.9
CC
1
Cov
0%
_init
2.0
properties
2.0
BEGIN
2.0
CRAP 2.0
1 # ----------------------------------------------------------------------------
2 #
3 # This module supports cached access to file properties.
4 #
5 # Copyright © 2010,2011 Brendt Wohlberg <wohl@cpan.org>
6 # See distribution LICENSE file for license details.
7 #
8 # Most recent modification: 4 November 2011
9 #
10 # ----------------------------------------------------------------------------
11  
12 package File::Properties::PropsCache;
13 our $VERSION = 0.01;
14  
15 use File::Properties::Error;
16 use File::Properties::Cache;
17 use File::Properties;
18 use base qw(File::Properties::Cache);
19  
20 require 5.005;
21 use strict;
22 use warnings;
23 use Error qw(:try);
24  
25  
26 # ----------------------------------------------------------------------------
27 # Initialiser
28 # ----------------------------------------------------------------------------
29 sub _init {
30 my $self = shift;
31 my $dbfp = shift; # Database file path
32 my $opts = shift; # Options hash
33  
34 $self->SUPER::_init($dbfp, $opts);
35 File::Properties->_cacheinit($self, $opts);
36 }
37  
38  
39 # ----------------------------------------------------------------------------
40 # Create File::Properties object for specified path
41 # ----------------------------------------------------------------------------
42 sub properties {
43 my $self = shift;
44 my $path = shift; # File path
45  
46 return File::Properties->new($path, $self);
47 }
48  
49  
50 # ----------------------------------------------------------------------------
51 # End of method definitions
52 # ----------------------------------------------------------------------------
53  
54  
55 1;
56 __END__