Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

getting module output in a cgi file

by rjsaulakh (Beadle)
on Dec 17, 2005 at 11:35 UTC ( [id://517468]=perlquestion: print w/replies, xml ) Need Help??

rjsaulakh has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: getting module o/p in a cgi file
by bradcathey (Prior) on Dec 17, 2005 at 13:18 UTC

    Like the good monks have been telling you, use a templating system like HTML::Template and a lot of your issues will dissolve away. Get the HTML out of your CGI. It's sooooo much easier.


    —Brad
    "The important work of moving the world forward does not wait to be done by perfect men." George Eliot
Re: getting module output in a cgi file
by Joost (Canon) on Dec 17, 2005 at 15:59 UTC
    Remove the exit statement or you won't even be able to use the module. also, I'd STRONGLY suggest using strict, lexical variables and pass the values as function arguments instead of relying on vars that are declared (or not) SOMEWHERE else.

    then do something like:

    use ModuleName; # ... pageNumbers($total_pages,$matches,$total_records_page, @and_whatever_o +ther_variables_you_need);
Re: getting module output in a cgi file
by Your Mother (Archbishop) on Dec 17, 2005 at 19:43 UTC

    Don't forget that using abbreviations like "o/p" can be confusing to readers who aren't sure what they mean especially in this case when I believe you actually meant G.O. (Kidding!)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://517468]
Approved by Joost
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-19 02:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found