this issue has been resolved. The problem? Multiple typos ! doh! Hello again monks. I'm trying to work out a tiny application using CGI::Application, but I'm running into a bit of a snag. I'm trying to work from the information inside of this tutorial: http://www.perl.com/pub/a/2001/06/05/cgi.html . currently, the error I'm getting is this:
Error executing run mode 'show_search_form': Can't locate object metho +d "query" via package "self" (perhaps you forgot to load "self"?) at +dictionarylookup.pm line 29. at Z:/cgi-bin/dictionarylookup.cgi line 7
I'm not really sure what to make of it - because the tutorial I'm following seems to be the exact same as what I'm doing. I'm not sure why it's failing. This is my first time throwing anything like this together. If you can help me figure out why this is happening I would be grateful. dictionarylookup.pm looks like this:
#!/usr/bin/perl -w #this app is extremely simple - it's pretty much a sort of 'hello worl +d' #MVC application using the CGI::Application framework. #-------- use CGI::Carp qw(fatalsToBrowser); package dictionarylookup; use CGI::Application; use base 'CGI::Application'; use strict; #run at startup;; sub setup { my $self = shift; $self->start_mode('show_search_form'); $self->mode_param('rm'); $self->run_modes([qw/show_search_form display_form_results/]); } #sub to show form; sub show_search_form{ my $self = shift; my $q = self->query(); my $out = ''; $out .= $q->_start_html(-title => 'Dictionary Word Lookup'); $out .= $q->start_form(); $out .= $q->textfield(-name=>'word', -size=>50, -maxlength=>50); $out .= $q->hidden(-name => 'rm', -value => 'display_form_results' +); $out .= $q->submit(); $out .= $q->end_form(); $out .= $q->end_html(); return $out; } #sub to process/display results; #for now: just output the dang word! sub display_form_results{ my $self = shift; my $q = self->query(); my $tainted_word = $self->param('word'); my $out = ''; $out .= $q->_start_html(-title => 'Dictionary Word Lookup'); $out .= $q->h1($tainted_word); $out .= $q->end_html(); return $out; } 1;
For completeness, my instance script looks like this:
#!/usr/bin/perl -w use CGI::Carp qw(fatalsToBrowser); use dictionarylookup; my $app = dictionarylookup->new(); $app->run();

In reply to CGI::Application beginner help THIS IS RESOLVED by misterMatt

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.