Convert.pm untested

filter: Statementstmt 0.0% 0 / 5 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 8 CC 1 SCAR 6.9
CC
1
Cov
0%
Version
2.0
BEGIN
2.0
CRAP 2.0
1 package MAIL::CONVERT;
2  
3 $VERSION = "1.1";
4 sub Version { $VERSION; }
5  
6 require 5.001;
7  
8 #This file does not action except to set the version
9  
10 =head1 NAME
11  
12 Mail::Addressbook::Convert - convert to and from many e-mail addressbooks
13  
14 =head1 SYNOPSIS
15  
16 These modules allow to to convert between the following e-mail addressbook formats
17  
18 From To
19 csv csv ( Note: MS Outlook. Outlook Express and many other mailers will
20 export and import into this format)
21 tsv tsv (tab-separated ascii, Outlook and OE also do these)
22 pine pine
23 ccMail
24 Eudora Eudora
25 Pegasus Pegasus
26 Juno
27 Lidf Ldif (Netscape 4 exports in this format )
28 Mailrc
29 Spry
30  
31  
32  
33  
34 =head1 REQUIRES
35  
36 Perl, version 5.001 or higher
37 File::Basename
38 Carp
39  
40 =head1 DESCRIPTION
41  
42 This distribution will convert email addressbooks between many common formats. Some examples are Pine, Eudora, Pegasus, csv.
43  
44 The documentation here is general. For details on conversion, each module has pod
45 documentation specific to its conversion
46  
47  
48 As an example
49  
50 To use to convert between Pine and Eudora as an example, you would do the following
51  
52 use Mail::Addressbook::Convert::Pine;
53  
54 use Mail::Addressbook::Convert::Eudora;
55  
56 my $Pine = new Mail::Addressbook::Convert::Pine();
57  
58 my $Eudora = new Mail::Addressbook::Convert::Eudora();
59  
60 my $PineInFile ="pineSample.txt"; # name of the file containing the Pine data
61  
62 my $raIntermediate = $Pine->scan(\$PineInFile);
63  
64 my $raEudora = $Eudora->output($raIntermediate); # reference to an array containing a Eudora addressbook
65  
66 All modules follow this template except Pegasus. Pegasus stores its address books in multiple
67 files. See the documentation in Pegasus.pm
68  
69  
70 =head1 DEFINITIONS
71
72 Standard Intermediate Format(STF) :
73  
74 The addressbook format that is used as an intermediate
75 between conversions. It is rfc822 compliant and can
76 be used directly as a Eudora addressbook. Do not use
77 a Eudora addressbook as an STF. Some versions of
78 Eudora use a format, that while RFC822 compliant, will
79 not work as an STF. Run the Eudora addressbook
80 through $Eudora->scan()
81
82  
83
84  
85 =head1 METHODS
86  
87 All modules have new and scan methods. All modules except Juno, CcMail, Spry, and Mailrc have output.
88 All modules except Pegasus follow the templates below
89  
90 =head2 new
91  
92 no arguments needed for all modules.
93  
94 =head2 scan
95  
96 Input : a reference to an array containing a addressbook file or a reference to a scalar containing
97 the file name with the addressbook data.
98 Returns: a reference to a STF ( see above).
99  
100 =head2 output
101  
102 All modules except Juno, CcMail, Spry, and Mailrc have output methods.
103  
104 Input: a reference to a STF ( see above).
105 Returns : a reference to an array containing a pine file.
106  
107  
108 =head1 LIMITATIONS
109  
110 This only converts email address, aliases, and mailing lists. Phone numbers,
111 postal addresses and other such data are not converted.
112  
113  
114  
115 =head1 REFERENCES
116  
117 See individual modules for references
118
119  
120 =head1 HISTORY
121  
122 This code is derived from the code used on www.interguru.com/mailconv.htm . The site
123 has been up since 1996 The site gets about 8000 unique visitors a month, many of whom make addressbook
124 conversions. The code has been well tested.
125  
126 =head1 FUTURE DIRECTIONS
127  
128  
129  
130 =head1 SEE ALSO
131  
132 There are other ways to convert addressbooks. Many e-mail clients will import adressbooks of other
133 e-mail clients.
134  
135 Dawn is an open source system that will run on Unix and Windows.
136  
137 You can find information on Dawn and other methods on www.interguru.com/MailInformation.htm
138  
139 You can do conversions directly on the Web at www.interguru.com/mailconv.htm .
140  
141  
142 =head1 BUGS
143  
144 =head1 CHANGES
145  
146 Original Version 2002-Feb-09
147
148 =head1 COPYRIGHT
149  
150 Copyright (c) 2001 Joe Davidson. All rights reserved.
151 This program is free software; you can redistribute it
152 and/or modify it under the terms of the Perl Artistic License
153 (see http://www.perl.com/perl/misc/Artistic.html). or the
154 GPL copyleft license ( http://www.gnu.org/copyleft/gpl.html)
155  
156  
157 =head1 AUTHOR
158  
159 Mail::Addressbook::Convert was written by Joe Davidson <jdavidson@interguru.com> in 2002.
160  
161 =cut