blib/lib/FFI/Build/PluginData.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 30 CC 2 SCAR 12.0
CC
2
Cov
0%
plugin_data
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.3
1 package FFI::Build::PluginData;
2  
3 use strict;
4 use warnings;
5 use parent qw( Exporter );
6  
7 our @EXPORT_OK = qw( plugin_data );
8  
9 # ABSTRACT: Platform and local customizations of FFI::Build
10 our $VERSION = '2.11'; # VERSION
11  
12  
13 sub plugin_data
14 {
15 my($self) = @_;
16 my $caller = caller;
17 if($caller =~ /^FFI::Build::Plugin::(.*)$/)
18 {
19 return $self->{plugin_data}->{$1} ||= {};
20 }
21 else
22 {
23 require Carp;
24 Carp::croak("plugin_data must be called by a plugin");
25 }
26 }
27  
28 1;
29  
30 __END__