I thought about using a module, but then I've got an unrelated function call at the top of a script that has nothing to do with logging in.

Here's the flow of the app:
login->select a project->do something with that project

But "select a project" might be initiated from somewhere else (not login) within the web app as well.

E.g., I want to list all projects the user is associated with, but I might want to call this project list from 1) the login screen; 2) some other area within my application. This script shouldn't expect to process login information every time it's called or expect to receive login credentials every time it's called.

It seems like this would be a common problem in perl/CGI. Should I assume that most work done in perl/CGI is either 1) user initiated through a form; or 2) executed with a single script calling functions from other modules?


In reply to Re^2: How to call perl CGI script from another perl CGI script by Calm
in thread How to call perl CGI script from another perl CGI script by Calm

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.