File Coverage

blib/lib/PheMail/General.pm
Criterion Covered Total %
statement 12 17 70.5
branch 0 2 0.0
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 16 25 64.0


line stmt bran cond sub pod time code
1             package PheMail::General;
2              
3 1     1   9692 use 5.006;
  1         4  
  1         216  
4 1     1   7 use strict;
  1         2  
  1         44  
5 1     1   7 use warnings;
  1         16  
  1         44  
6 1     1   5 use vars qw($file);
  1         2  
  1         375  
7             require Exporter;
8              
9             our @ISA = qw(Exporter);
10              
11             # Items to export into callers namespace by default. Note: do not export
12             # names by default without a very good reason. Use EXPORT_OK instead.
13             # Do not simply export all your public functions/methods/constants.
14              
15             # This allows declaration use PheMail::General ':all';
16             # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
17             # will save memory.
18             our %EXPORT_TAGS = ( 'all' => [ qw(
19            
20             ) ] );
21              
22             our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
23              
24             our @EXPORT = qw(
25             ReadConfig
26             );
27             our $VERSION = '0.01';
28              
29             $file = "/usr/local/phemail/etc/phemail.conf";
30              
31             # Preloaded methods go here.
32             sub ReadConfig($) {
33 0     0 0   my $get = shift;
34 0           open(CONF,"<$file");
35 0           while() {
36 0           chomp;
37 0 0         return $1 if /^$get=(.+)/;
38             }
39             }
40              
41             1;
42             __END__