MHonArc
view release on metacpan or search on metacpan
lib/mhrcfile.pl view on Meta::CPAN
if ($elem eq 'lockmethod') { # Locking method
if ($line = &get_elem_last_line($handle, $elem)) {
$LockMethod = &set_lock_mode($line);
}
last FMTSW;
}
if ($elem eq 'mailto') { # Convert e-mail addrs
$NOMAILTO = 0;
last FMTSW;
}
if ($elem eq 'mailtourl') { # mailto URL
while (defined($line = <$handle>)) {
last if $line =~ /^\s*<\/mailtourl\s*>/i;
next if $line =~ /^\s*$/;
$line =~ s/\s//g;
$MAILTOURL = $line;
}
last FMTSW;
}
if ($elem eq 'main') { # Print main index
$MAIN = 1;
last FMTSW;
}
if ($elem eq 'maxpgs') { # Max number of index pages
if (($tmp = &get_elem_int($handle, $elem, 1)) ne '') {
$MAXPGS = $tmp;
}
last FMTSW;
}
if ($elem eq 'maxsize') { # Size of archive
if (($tmp = &get_elem_int($handle, $elem, 1)) ne '') {
$MAXSIZE = $tmp;
}
last FMTSW;
}
if ($elem eq 'msgbodyend') { # Markup after message body
$MSGBODYEND = &get_elem_content($handle, $elem, $chop);
last FMTSW;
}
if ($elem eq 'msgexcfilter') { # Code selectively exclude msgs
$MsgExcFilter = &get_elem_content($handle, $elem, $chop);
last FMTSW;
}
if ($elem eq 'msgpgs') { # Output message pages
$NoMsgPgs = 0;
last FMTSW;
}
if ($elem eq 'msgprefix') { # Prefix for message files
if ($line = &get_elem_last_line($handle, $elem)) {
$line =~ s/\s//g;
$MsgPrefix = $line;
}
last FMTSW;
}
if ($elem eq 'mhpattern') { # File pattern MH-like dirs
if ($line = &get_elem_last_line($handle, $elem)) {
$MHPATTERN = $line;
}
last FMTSW;
}
if ($elem eq 'mimealtprefs') { # Mime alternative prefs
$IsDefault{'MIMEALTPREFS'} = 0;
@MIMEAltPrefs = ();
while (defined($line = <$handle>)) {
last if $line =~ /^\s*<\/mimealtprefs\s*>/i;
$line =~ s/\s//g;
push(@MIMEAltPrefs, lc($line)) if $line;
}
last FMTSW;
}
if ($elem eq 'mimedecoders') { # Mime decoders
$IsDefault{'MIMEDECODERS'} = 0;
if ($override) {
%readmail::MIMEDecoders = ();
%readmail::MIMEDecodersSrc = ();
}
while (defined($line = <$handle>)) {
last if $line =~ /^\s*<\/mimedecoders\s*>/i;
next unless $line =~ /\S/;
$line =~ s/\s//g;
($type, $routine, $plfile) = split(/;/, $line, 3);
$type =~ tr/A-Z/a-z/;
$readmail::MIMEDecoders{$type} = $routine;
$readmail::MIMEDecodersSrc{$type} = $plfile
if $plfile =~ /\S/;
}
last FMTSW;
}
if ($elem eq 'mimefilters') { # Mime filters
$IsDefault{'MIMEFILTERS'} = 0;
if ($override) {
%readmail::MIMEFilters = ();
%readmail::MIMEFiltersSrc = ();
}
while (defined($line = <$handle>)) {
last if $line =~ /^\s*<\/mimefilters\s*>/i;
next if $line =~ /^\s*$/;
$line =~ s/\s//g;
($type, $routine, $plfile) = split(/;/, $line, 3);
$type =~ tr/A-Z/a-z/;
$readmail::MIMEFilters{$type} = $routine;
$readmail::MIMEFiltersSrc{$type} = $plfile
if $plfile =~ /\S/;
}
last FMTSW;
}
if ($elem eq 'mimeargs') { # Mime arguments
$IsDefault{'MIMEARGS'} = 0;
%readmail::MIMEFiltersArgs = () if $override;
while (defined($line = <$handle>)) {
last if $line =~ /^\s*<\/mimeargs\s*>/i;
next unless $line =~ /\S/;
$line =~ s/^\s+//;
if ($line =~ /;/) {
($type, $arg) = split(/;/, $line, 2);
} else {
($type, $arg) = split(/:/, $line, 2);
}
$type =~ tr/A-Z/a-z/ if $type =~ m%/%;
$readmail::MIMEFiltersArgs{$type} = $arg;
}
last FMTSW;
}
if ($elem eq 'mimeexcs') { # Mime exclusions
$IsDefault{'MIMEEXCS'} = 0;
( run in 0.773 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )