All/Format.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 94.4% 17 / 18 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
new
1.0
CRAP 1.0
« All/IO.pm ↑ Summary All/Format/Base.pm »
1 package Data::All::Format;
2  
3  
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 # CPAN Modules
7 1 ▶use base qw( Class::Factory );
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 our $VERSION = 0.10;
10  
11 # TODO: Give Data::All control of creating the Format objects. It should send them to IO
12  
13 # TODO: Allow external code to add new instance objects
14 1 Data::All::Format->register_factory_type( delim => 'Data::All::Format::Delim' );
15 1 Data::All::Format->register_factory_type( fixed => 'Data::All::Format::Fixed' );
16 1 Data::All::Format->register_factory_type( hash => 'Data::All::Format::Hash' );
17  
18  
19 sub new()
20 4 ▶{
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
21 4 my ( $pkg, $type ) = ( shift, shift );
22 4 my $class = $pkg->get_factory_class( $type );
23
24 # Use the base's new b/c it's will properly create the modules in
25 # spiffy styles
26 4 return $class->new(@_);
27 }
28  
29  
30  
31  
32  
33  
34  
35  
36  
37 1 1;
38  
39  
40  
« All/IO.pm ↑ Summary All/Format/Base.pm »