Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

What you have there should basically work, although there are a few problems with your code. However, I suspect the real problem is somewhere in the rest of the code that you haven't included.

Here are a couple of things that you should consider changing:

  • add 'use strict;' to the top: Since you don't have a 'my $output' in your Login sub, I assume that you are not using strict. And while you are at it, you should probably add 'use warnings;' as well, and 'use diagnostics;' if you don't understand the errors or warnings that are spit out.
  • is 'h3' a method that you wrote? Or is it part of the CGI.pm library, and it should have been $q->h3?
  • Are you using something different than CGI.pm, because 'password' is not a valid method of CGI.pm (see the call to $q->password). It should probably be password_field instead.

I doubt that fixing those problems will remove the error though. Also, the error message is kind of an odd one. CGI::Application doesn't use a DESTROY method, so where is that coming from? I am wondering if maybe your are loading a module that imports a lot of functions, and it happens to override some of the functionality in CGI::Application (a common mistake is to add something like 'use CGI qw(:standard)' to your app, which unexpectedly overrides some important methods in CGI::Application).

Without more code, it is all just guesswork though...


In reply to Re: Seeking help with CGI::Application, please. by cees
in thread Seeking help with CGI::Application, please. by hesco

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-03-28 20:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found