FIT.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 27 CC 2 SCAR 12.8
CC
2
Cov
0%
attribute
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.6
1 package Test::FIT;
2 $VERSION = '0.11';
3 @EXPORT = qw(attribute);
4 use strict;
5 use base 'Exporter';
6  
7 sub attribute {
8 my $attribute = shift;
9 my $pkg = caller;
10 no strict 'refs';
11 *{"${pkg}::$attribute"} =
12 sub {
13 my $self = shift;
14 return $self->{$attribute} unless @_;
15 $self->{$attribute} = shift;
16 return $self;
17 };
18 }
19  
20 1;
21  
22 __END__