MHonArc

 view release on metacpan or  search on metacpan

contrib/mhastart.pl  view on Meta::CPAN

        popretrieve() if $pop3 and $checkpop;
        require File::Spec->catfile($mhonarc, $command)
            or die "Couldn't invoke $command\n$!";
    } else {
        print "That wasn't a MHonArc command, was it?";
    }
}

##---------------------------------------------------------------------------

sub updatembox {
    my $msgref = shift;
    open FILE, ">> $mbox" or die "Couldn't open $mbox\n$!";
    flock FILE, 2;
    print FILE ($pop3 ? join '', @$msgref : $$msgref), "\n\n";
    close FILE;
}

sub updatearchive {
    @ARGV = (@_, '-outdir', $archive);
    push @ARGV, $mbox unless $in{routine} eq 'remove';
    require 'mhamain.pl' or die "Couldn't require mhamain.pl\n$!";
    mhonarc::initialize();       # skipped the 'mhonarc' program file in
    mhonarc::process_input();    # order to avoid the ending exit call
}

sub popretrieve {
    require Net::POP3;
    my $pop = Net::POP3->new($pophost);

lib/mhopt.pl  view on Meta::CPAN

##	Usage routine
##
sub usage {
    require 'mhusage.pl';
    &mhusage();
}

##---------------------------------------------------------------------------
##	Routine to update 1.x data structures to 2.0.
##
sub update_data_1_to_2 {
    local (%EntName2Char) = ('lt', '<', 'gt', '>', 'amp', '&',);
    #--------------------------------------
    sub entname_to_char {
        my ($name) = shift;
        my ($ret)  = $EntName2Char{$name};
        if (!$ret) {
            $ret = "&$name;";
        }
        $ret;
    }

lib/mhopt.pl  view on Meta::CPAN

    }
    delete $IndexNum{''};
    $TLITXT = '<li>' . $TLITXT unless ($TLITXT) && ($TLITXT =~ /<li>/i);
    $THEAD .= "<ul>\n" unless ($THEAD) && ($THEAD =~ m%<ul>\s*$%i);
    $TFOOT = "</ul>\n" unless ($TFOOT) && ($TFOOT =~ m%^\s*</ul>%i);
}

##---------------------------------------------------------------------------
##	Update 2.1, or earlier, data.
##
sub update_data_2_1_to_later {
    no warnings qw(deprecated);
    # we can preserve filter arguments
    if (%main::MIMEFiltersArgs) {
        warn qq/         preserving MIMEARGS...\n/;
        %readmail::MIMEFiltersArgs = %main::MIMEFiltersArgs;
        $IsDefault{'MIMEARGS'} = 0;
    }
}

##---------------------------------------------------------------------------
##	Update 2.4, or earlier, data.
##
sub update_data_2_4_to_later {
    # convert Perl 4 style data to Perl 5 style
    my ($index, $value);
    while (($index, $value) = each(%Refs)) {
        next if ref($value);
        $Refs{$index} = [split(/$X/o, $value)];
    }
    while (($index, $value) = each(%FollowOld)) {
        next if ref($value);
        $FollowOld{$index} = [split(/$bs/o, $value)];
    }



( run in 0.227 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )