Quantity.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 38 CC 1 SCAR 6.9
CC
1
Cov
0%
formatted_quantity
2.0
named_subclass
2.0
BEGIN
2.0
CRAP 2.0
1 =head1 NAME
2  
3 Data::Quantity - Perl extension for blah blah blah
4  
5 =head1 SYNOPSIS
6  
7 use Data::Quantity;
8 blah blah blah
9  
10 =head1 DESCRIPTION
11  
12 Data::Quantity is a framework for blessed scalar values that can have appropriate parsing and printing methods called on them.
13  
14 =cut
15  
16 ########################################################################
17  
18 package Data::Quantity;
19  
20 require 5;
21 use strict;
22 use warnings;
23  
24 use vars qw( $VERSION @ISA @EXPORT_OK );
25 $VERSION = 0.001;
26  
27 push @ISA, qw( Exporter );
28 push @EXPORT_OK, qw( formatted_quantity );
29  
30 use Class::MakeMethods;
31 use Class::MakeMethods::Template::ClassName;
32  
33 # formatted_quantity($q_type, $value)
34 # formatted_quantity($q_type, $value, $style_or_scale)
35 sub formatted_quantity {
36 named_subclass( shift )->readable_value( @_ );
37 }
38  
39 # $subclass = named_subclass( $packagename );
40 sub named_subclass {
41 my $q_type = shift or croak "Must specify quantity type.";
42
43 my $subclass = Class::MakeMethods::Template::ClassName::_unpack_subclass(
44 'Data::Quantity', $q_type );
45 my $class = Class::MakeMethods::Template::ClassName::_require_class( $class );
46 }
47  
48 ########################################################################
49  
50 =head1 SEE ALSO
51  
52 See L<Data::Quantity::ReadMe> for distribution and license information.
53  
54 =cut
55  
56 ########################################################################
57  
58 1;