File Coverage

blib/lib/Astro/App/Satpass2/FormatValue/Formatter.pm
Criterion Covered Total %
statement 20 20 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 3 3 100.0
total 31 31 100.0


line stmt bran cond sub pod time code
1             package Astro::App::Satpass2::FormatValue::Formatter;
2              
3 11     11   316 use 5.008;
  11         71  
4              
5 11     11   66 use strict;
  11         25  
  11         407  
6 11     11   58 use warnings;
  11         31  
  11         660  
7              
8 11     11   6773 use Astro::App::Satpass2::FormatValue;
  11         39  
  11         1102  
9 11     11   95 use Astro::App::Satpass2::Utils qw{ has_method @CARP_NOT };
  11         23  
  11         3932  
10              
11             our $VERSION = '0.057';
12              
13             sub new {
14 1     1 1 3 my ( $class, $info ) = @_;
15              
16 1         4 return bless {
17             info => $info,
18             code => Astro::App::Satpass2::FormatValue
19             ->__make_formatter_code( $info ),
20             }, $class;
21              
22             }
23              
24             sub code {
25 1     1 1 3 my ( $self ) = @_;
26 1         4 return $self->{code};
27             }
28              
29             sub name {
30 3     3 1 8 my ( $self ) = @_;
31 3         13 return $self->{info}{name};
32             }
33              
34             1;
35              
36             __END__