File Coverage

blib/lib/DBIx/Wrapper/Delegator.pm
Criterion Covered Total %
statement 9 14 64.2
branch 0 2 0.0
condition n/a
subroutine 3 4 75.0
pod n/a
total 12 20 60.0


line stmt bran cond sub pod time code
1             # -*-perl-*-
2             # Creation date: 2005-03-04 21:15:40
3             # Authors: Don
4             # Change log:
5             # $Revision: 1963 $
6              
7             # Copyright (c) 2005-2012 Don Owens . All rights reserved.
8              
9             # This is free software; you can redistribute it and/or modify it
10             # under the same terms as Perl itself. See perlartistic.
11              
12             # This program is distributed in the hope that it will be
13             # useful, but WITHOUT ANY WARRANTY; without even the implied
14             # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15             # PURPOSE.
16              
17 2     2   163 use strict;
  2         5  
  2         97  
18              
19             package DBIx::Wrapper::Delegator;
20              
21 2     2   13 use warnings;
  2         4  
  2         76  
22              
23 2     2   11 use vars qw($VERSION $AUTOLOAD);
  2         4  
  2         417  
24             $VERSION = do { my @r=(q$Revision: 1963 $=~/\d+/g); sprintf "%d."."%02d"x$#r,@r };
25              
26             sub AUTOLOAD {
27 0     0     my $self = shift;
28              
29 0           (my $func = $AUTOLOAD) =~ s/^.*::([^:]+)$/$1/;
30 0 0         return undef if $func eq 'DESTROY';
31            
32 0           my $key = $func; # turn method call into hash access
33 0           return $self->{$func};
34             }
35              
36              
37             1;