I always restart Apache so that's not the problem. Here are the full contents of startup.pl and Config.pm as well as the first 20 or so lines of index.cgi.

Contents of startup.pl:

use lib qw(/var/www/blogapp); use Config (); use CGI; use DBI; use DBD::SQLite; use HTML::Template; use XML::RSS; use Net::SMTP; use Captcha::reCAPTCHA; use HTML::Entities; use HTTP::Request::Common; use URI::_foreign; use Errno; use Net::HTTP; use IO::Select; use Compress::Zlib; use Log::Agent; use URI::http; use LWP::Protocol::http; use Carp::Heavy; 1;

Contents of Config.pm:

package Config.pm; use strict; our $database = 'data/site.db'; our $tmplfile = 'templates/index.html'; our $blog_title = 'example.com'; our $blog_subtitle = 'My New Blog'; our $blog_url = 'http://www.example.com/'; our $blog_owner = 'user@example.com'; our $blog_rights = 'Copyright 2009, Example User'; our $feed_updates = 'hourly'; our $captcha_pubkey = ''; our $captcha_seckey = ''; our $comment_max_length = '1000'; our $comments_allowed = 0; our $smtp_server = 'localhost:25'; our $smtp_sender = 'blogapp@example.com'; 1;

First ~20 lines of index.cgi:

use strict; my $database = $Config::database; my $tmplfile = $Config::tmplfile; my $blog_title = $Config::blog_title; my $blog_subtitle = $Config::blog_subtitle; my $blog_url = $Config::blog_url; my $blog_owner = $Config::blog_owner; my $blog_rights = $Config::blog_rights; my $feed_updates = $Config::feed_updates; my $captcha_pubkey = $Config::captcha_pubkey; my $captcha_seckey = $Config::captcha_seckey; my $comment_max_length = $Config::comment_max_length; my $comments_allowed = $Config::comments_allowed; my $smtp_server = $Config::smtp_server; my $smtp_sender = $Config::smtp_sender; my $cgi = CGI->new; my $dbh = DBI->connect("DBI:SQLite:dbname=$database", '', '', { RaiseE +rror => 1 }) || die $DBI::errstr ; print STDERR "FOOBAR $Config::blog_title\n"; my $template = HTML::Template->new(filename => $tmplfile, die_on_bad_p +arams => 0);
-fp

In reply to Re^4: Using packages to store global configuration vars by fuzzyping
in thread Using packages to store global configuration vars by fuzzyping

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.