Apache-NNTPGateway

 view release on metacpan or  search on metacpan

NNTPGateway.pm  view on Meta::CPAN

    my $subject = $Article->{Header}{subject};
    $subject = "Re: $subject" unless $subject =~ /^re\s*:/i;
    # Add references
    my $refs  = $Article->{Header}{references};
    my $msgid = $Article->{Header}{'message-id'};
    $refs .= $msgid;
    # Quote body
    my $body = "\n " . &message( 'msg_cite', $msgid, $Article->{Header}{from} ) . ":\n\n";
    $Article->{Body} =~ s/^\s*(.*)$/ > $1/gm;
    $body .= $Article->{Body} . "\n\n";
    # Print a form for user to edit fields and post.
    &print_html_post_form( $r, $subject, $body, $refs );
    # The remaining, that is the real NNTP posting is handled by
    # action_post() which is called from a submit (POST method) with
    # the form with the right arguments.

  } else {

    # invalid article id
    &print_html_error( $r, &message( 'inv_id', $id ));
  }



( run in 0.343 second using v1.01-cache-2.11-cpan-de7293f3b23 )