I fixed a few minor errors in your script. Try this and see if it helps:
#!/usr/bin/perl package Bloggie; use base qw(CGI::Application); use strict; use warnings; use CGI::Carp qw/fatalsToBrowser/; use CGI::Application::Plugin::TT; use DB_File; sub setup { my $self = shift @_; $self->start_mode('start'); $self->mode_param('rm'); $self->run_modes( 'start' => 'start', 'new post form' => 'new_post_form', 'new post success' => 'new_post_success', 'redirect' => 'redirect', ); } sub cgiapp_get_query { require CGI::Simple; CGI::Simple->new(); } sub cgiapp_init { my $self = shift; my $dataname = "data.dbm"; my %database; die("Can't open ${dataname}: $!\n") unless dbmopen %database, $dataname, 438; $$self{'DATA'} = \%database; } sub start { my $self = shift; my $templatename = 'start.tt'; my %database = %{ $$self->{'DATA'}; }; my $posts = $database{'POSTS'}; my $vars = { 'posts', $posts }; return $self->tt_process( $templatename, $vars ); } sub new_post_form { my $self = shift; my $templatename = 'new_post_form.tt'; return $self->tt_process($templatename); } sub new_post_success { my $self = shift; my $templatename = "new_post_success.tt"; my (%database) = %{ $$self->{'DATA'}; }; my @posts = (); my $post; if ( defined $database{'POSTS'} ) { @posts = @{ $database{'POSTS'}; }; } my $query = $self->query; my $title = $self->param('title'); my $content = $self->param('content'); $post = { title => $title, content => $content }; my $vars = { title => $title, content => $content }; push @posts, $post; $database{'POSTS'} = \@posts; return $self->tt_process( $templatename, $vars ); } 1;

In reply to Re: CGI::Application giving blank forms by Khen1950fx
in thread CGI::Application giving blank forms by Poincare

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.