git://git.jankratochvil.net
/
PerlMail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support 9210 CSV contacts format.
[PerlMail.git]
/
contacts-n9k2mutt
diff --git
a/contacts-n9k2mutt
b/contacts-n9k2mutt
index
81aa704
..
bba3b46
100755
(executable)
--- a/
contacts-n9k2mutt
+++ b/
contacts-n9k2mutt
@@
-32,9
+32,16
@@
Getopt::Long::Configure(
"no_ignorecase",
"bundling",
);
"no_ignorecase",
"bundling",
);
+my $opt_9000;
die if !Getopt::Long::GetOptions(
die if !Getopt::Long::GetOptions(
+ "9000"=>\$opt_9000,
);
);
+my $type="9210";
+$type="9000" if $opt_9000;
+my $class="PerlMail::Contacts::$type";
+eval "require $class;1;" or die "Cannot load loader $class: $!";
+
undef $/;
while (<>) {
my @data=map({
undef $/;
while (<>) {
my @data=map({
@@
-50,7
+57,7
@@
while (<>) {
"iscompany"=>($record{"Name"} && $record{"Company"} && $record{"Name"} eq $record{"Company"}),
}));
} @record);
"iscompany"=>($record{"Name"} && $record{"Company"} && $record{"Name"} eq $record{"Company"}),
}));
} @record);
- }
PerlMail::Contacts::9000
->in($_));
+ }
$class
->in($_));
my @nicked=map({
my $data=$_;
my($name,$mail,$attr,$iscompany)=map(($data->{$_}),qw(name mail attr iscompany));
my @nicked=map({
my $data=$_;
my($name,$mail,$attr,$iscompany)=map(($data->{$_}),qw(name mail attr iscompany));