File Coverage

blib/lib/Config/MethodProxy.pm
Criterion Covered Total %
statement 20 20 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 3 3 100.0
total 30 30 100.0


line stmt bran cond sub pod time code
1             package Config::MethodProxy;
2              
3             $Config::MethodProxy::VERSION = '0.03';
4              
5             =head1 NAME
6              
7             Config::MethodProxy - A backwards compatibility shim for Data::MethodProxy.
8              
9             =head1 DESCRIPTION
10              
11             This module's distribution has been renamed to C and this
12             module itself has been turned into a shell of a shim over L.
13              
14             Use L directly, not this module.
15              
16             This module will be removed once a reasonable amount of time has passed and
17             any reverse dependencies have gone away or deamed ignorable.
18              
19             =cut
20              
21 1     1   206091 use strict;
  1         6  
  1         29  
22 1     1   6 use warnings;
  1         1  
  1         25  
23              
24 1     1   424 use Data::MethodProxy;
  1         3  
  1         33  
25 1     1   7 use Exporter qw( import );
  1         2  
  1         229  
26              
27             our @EXPORT = qw(
28             apply_method_proxies
29             );
30              
31             our @EXPORT_OK = qw(
32             apply_method_proxies
33             is_method_proxy
34             call_method_proxy
35             );
36              
37             our %EXPORT_TAGS = ('all' => \@EXPORT_OK);
38              
39             my $mproxy = Data::MethodProxy->new();
40              
41             =head1 FUNCTIONS
42              
43             Only the L function is exported by default.
44              
45             =head2 apply_method_proxies
46              
47             This calls L.
48              
49             =cut
50              
51             sub apply_method_proxies {
52 2     2 1 1156 my ($data) = @_;
53 2         6 local $Carp::Internal{ (__PACKAGE__) } = 1;
54 2         9 return $mproxy->render( $data );
55             }
56              
57             =head2 is_method_proxy
58              
59             This calls L.
60              
61             =cut
62              
63             sub is_method_proxy {
64 2     2 1 94 my ($proxy) = @_;
65 2         10 return $mproxy->is_valid( $proxy );
66             }
67              
68             =head2 call_method_proxy
69              
70             This calls L.
71              
72             =cut
73              
74             sub call_method_proxy {
75 2     2 1 451 my ($proxy) = @_;
76 2         7 local $Carp::Internal{ (__PACKAGE__) } = 1;
77 2         8 return $mproxy->call( $proxy );
78             }
79              
80             1;
81             __END__