blib/lib/perl5/Option/Factory.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 38 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
scalar
2.0
hash
2.0
CRAP 2.0
1 package Option::Factory;
2  
3 =pod
4  
5 =head1 NAME
6  
7 Option::Factory
8  
9 =head1 SYNOPSIS
10  
11 Generates new objects that encode Option::Option objects
12  
13 use Option::Factory;
14  
15 my $opts = Option::Factory->new();
16  
17 =head1 AUTHOR
18  
19 Lee Katz
20  
21 =head1 METHODS
22  
23 =cut
24  
25 use strict;
26 use warnings;
27 use Carp qw/confess croak/;
28 use Exporter qw/import/;
29 use File::Basename qw/dirname/;
30 #use FindBin;
31 #use lib dirname($INC{"Option/Factory.pm"})."..";
32 #use Option::Option;
33  
34  
35 our $VERSION = $Option::Option::VERSION;
36  
37 =pod
38  
39 =over
40  
41 =item new()
42  
43 Creates a new factory
44  
45 =cut
46  
47 sub new{
48 my($class) = @_;
49  
50 my $self = {
51 };
52  
53 bless($self, $class);
54  
55 return $self;
56 }
57  
58 =pod
59  
60 =item scalar()
61  
62 returns a scalar with a value
63  
64 =back
65  
66 =cut
67  
68 sub scalar{
69 my($self, $var) = @_;
70  
71 my $opt = Option::Option->new($var);
72  
73 return $opt;
74 }
75  
76 sub hash{
77 ...;
78 }
79 sub array{
80 ...;
81 }
82  
83 1;
84