Ah, understood. OK, that reduces the number of required changes a lot. :) Regarding Mojolicious (or other CGI.pm alternatives). Yes, I know it's bad to CGI.pm. But basically I really haven't found any alternative. I don't need frameworks to write applications and I don't need templates because I (as you've seen) I use Perl to write HTML. I only use CGI.pm to print out websites, so all the other neat features are totally wasted on me. And my main problem would be that I'd have to spend months to migrate everything I wrote over the past decades to the new system. At least CGI.pm isn't completely abandoned. The last update was beginning of January.

Adjusted to this now: test3.pl:
#!/usr/bin/perl -w use strict; use lib "/home/digioso/web/digioso.tk/stuff"; use Navi2; binmode STDOUT, ":utf8"; Navi2::print_navi(); print "test"; Navi2::end_navi();
Navi2.pm:
#!/usr/bin/perl -w use strict; use warnings; use CGI; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); package Navi2; 1; sub create_cgi { binmode STDOUT, ":utf8"; return new CGI; } sub print_navi() { my $cgi = create_cgi(); print $cgi->header (-type => 'text/html', -charset => 'UTF-8'); } sub end_navi() { my $cgi = create_cgi(); print $cgi->end_html; }

In reply to Re^4: upstream prematurely closed connection while reading response header from upstream by Digioso
in thread upstream prematurely closed connection while reading response header from upstream by Digioso

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.