blib/lib/Finance/Quant/Symbols.pm

filter: Statementstmt 61.9% 13 / 21 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod 0.0% 0 / 1 totaltotal 53.5% 15 / 28 CC 2 SCAR 11.6
CC
2
Cov
57%
new
6.0
DESTROY
2.0
BEGIN
1.0
CRAP 3.2
↑ Summary
1 #!/usr/bin/perl -w
2 package Finance::Quant::Symbols;
3  
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7  
8 1 require Exporter;
9  
10 1 our @ISA = qw(Exporter);
11  
12 # Items to export into callers namespace by default. Note: do not export
13 # names by default without a very good reason. Use EXPORT_OK instead.
14 # Do not simply export all your public functions/methods/constants.
15  
16 # This allows declaration use Finance::Quant::Symbols ':all';
17 # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
18 # will save memory.
19 1 our %EXPORT_TAGS = ( 'all' => [ qw(
20
21 ) ] );
22  
23 1 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
24  
25 1 our @EXPORT = qw(
26 new
27 );
28  
29 1 our $VERSION = '0.02';
30  
31  
32  
33 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
34 0 my $class = shift;
35 0 my $market = shift;
36  
37 my $self = bless {
38 0 ▶ symbols => [grep { if($_ =~ /=(.*)=(.*)/) {$_=[$1,$2];} } <DATA>],
Branch: 1 branch
BranchTrueFalseTotal
if ($_ =~ /=(.*)=(.*)/) 0 0 0
39 }, $class;
40  
41 0 return $self;
42  
43  
44 }
45  
46  
47 0 ▶sub DESTROY {
Subroutine DESTROY: not called CC=1 SCAR=6.9
48 0 my $self = shift;
49 0 warn "DESTROYING $self";
50 }
51  
52  
53  
54 =head1 NAME
55  
56 Finance::Quant::Symbols - Stock symbols
57  
58 =head1 DESCRIPTION
59
60
61 gerneric stock symbols within Finance::Quant
62  
63
64 =head1 SYNOPSIS
65  
66 use strict;
67 use warnings;
68 use Data::Dumper;
69 use Finance::Quant::Symbols;
70  
71 @markets = Finance::Quant::Symbols->new;
72  
73 print Dumper [@markets];
74  
75  
76 =head1 AUTHOR
77  
78 Hagen Geissler <santex@cpan.org>
79  
80 =head1 SEE ALSO
81  
82 Finance::Quant;
83  
84 =cut
85
86 __DATA__
↑ Summary